|
-
Nov 30th, 2010, 12:09 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] DataGridView Columns Order
Hello
I'm having a little problem with the order of the columns in the dgv.
I have a dgv with 5 columns (combos) added with the wizard, then in the form constructor i set the datasource, value member, displaymember and datapropertyname for each one, after this i fill the main data table and set the dgv datasource with it.
If i just do this and don't use the display index, the columns show in an wired order, doesn't show up like i defined in the wizard neither in the order of the sql statement.
For example, i add this columns (names):
B,C,E
Then if i use this select statement
Select A,B,C,D,E,F,G From Table
I thought that i can have one of this two situations, the columns that i added plus the remaining columns in the select or the columns in the order of the select. But that doesn't happen.
How the dgv choose the order of the columns?
Thanks
Rate People That Helped You
Mark Thread Resolved When Resolved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|