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
K

KoRUPT

@KoRUPT
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Column Order in a DataGridView with BindingList as DataSource
    K KoRUPT

    bump to the first page. I still need help on this issue. There are only 10 types of people in this world; Those who understand binary, and those who don't.

    .NET (Core and Framework) help csharp tutorial lounge

  • Column Order in a DataGridView with BindingList as DataSource
    K KoRUPT

    I am having problems getting the column order in a DataGridView object to display how I want it. Here are my objects: Data object class CData { //data members private uint id; private string name; private object otherstuff; //constructor ... //standard //get / set public uint ID{ get{ return id; } set{ id = value; } } ... //basic get/set for the other data members I then create multiple CData objects and place them in a List<CData> object "myList". When I go to bind this list to a DataGridView I use the following code BindingList<CData> bindlist = new BindingList<CData>(myList); myDataGridView.DataSource = bindlist; myDataGridView.Refresh() the problem comes when my form is shown and my data is presented. Currently I can not figure out how to order the columns generated from my CData class properties. By default I thought they would show up in the order that they are declared like: | ID | Name | OtherData | but I find that the order is chosen at random (or some other factor I can not figure out) and they display something like: | OtherData | ID | Name | Now normally this wouldnt be too big of a problem but in my real world application I am using a Data object with over 100 fields which are generated from a file with a strict structure layout and it is critical that I see my columns in the proper order. I hope I explained this properly and would appreciate any help that can be offered on the matter. Thank you. PS: If some moderator or something feels I will get more response in the C# forum, please move this post or advise me to move it. There are only 10 types of people in this world; Those who understand binary, and those who don't. -- modified at 17:30 Friday 27th January, 2006

    .NET (Core and Framework) help csharp tutorial lounge
  • Login

  • Don't have an account? Register

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