Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. datagrid column widths

datagrid column widths

Scheduled Pinned Locked Moved C#
questioncssvisual-studiowpfhelp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mikemilano
    wrote on last edited by
    #1

    i've seen lots of links to the syncrofusion site, but it still doesn't clear up the column width problem. i've added a tablestyle to my datagrid, .. and then i've added grid column styles to my table style. i populate my datagrid like this: dataGrid1.SetDataBinding(ds,"Contacts"); but how do i bind the tablestyle / column styles to this datagrid? i thought that is what i was doing in the gui of VS, but it does not pick up the widths i set. can someone clear this up any?

    I M 2 Replies Last reply
    0
    • M mikemilano

      i've seen lots of links to the syncrofusion site, but it still doesn't clear up the column width problem. i've added a tablestyle to my datagrid, .. and then i've added grid column styles to my table style. i populate my datagrid like this: dataGrid1.SetDataBinding(ds,"Contacts"); but how do i bind the tablestyle / column styles to this datagrid? i thought that is what i was doing in the gui of VS, but it does not pick up the widths i set. can someone clear this up any?

      I Offline
      I Offline
      Ista
      wrote on last edited by
      #2

      myDataGrid.DataSource = myTable; do a clear on the tables styles object before adding it, its easier. I'm not an expert yet, but I play one at work. Yeah and here too.

      1 Reply Last reply
      0
      • M mikemilano

        i've seen lots of links to the syncrofusion site, but it still doesn't clear up the column width problem. i've added a tablestyle to my datagrid, .. and then i've added grid column styles to my table style. i populate my datagrid like this: dataGrid1.SetDataBinding(ds,"Contacts"); but how do i bind the tablestyle / column styles to this datagrid? i thought that is what i was doing in the gui of VS, but it does not pick up the widths i set. can someone clear this up any?

        M Offline
        M Offline
        mdolby
        wrote on last edited by
        #3

        you have to set the Mapping Name of the tablestyle to that of the database table you want this style to apply to.. For exampe "Mapping Name = Contacts".. Also apply the mapping name of each columnstyle to map to the corresping column of your database table.. Freelance Developer... Constantly looking for Gigs.

        I 1 Reply Last reply
        0
        • M mdolby

          you have to set the Mapping Name of the tablestyle to that of the database table you want this style to apply to.. For exampe "Mapping Name = Contacts".. Also apply the mapping name of each columnstyle to map to the corresping column of your database table.. Freelance Developer... Constantly looking for Gigs.

          I Offline
          I Offline
          Ista
          wrote on last edited by
          #4

          but by his example setting the mappings still wont work I'm not an expert yet, but I play one at work. Yeah and here too.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups