Susan Harkins
ssharkins at gmail.com
Wed May 20 13:09:26 CDT 2009
I used VB Express 8.0 to retrieve a dataset from Northwind's Customers table. I dragged that onto a form to create a quick datagridview control. I wanted to disable the automatic column sorting for a specific column, so I added the following to the form's Load event: Me.DataGridViewTextBoxContactTitle.SortMode = DataGridViewColumnSortMode.NotSortable where ContactTitle is the column's name. It returned a Build error that the column wasn't a member of the form. Using Intellisense, I could see that it doesn't list the columns by name, but by number. I substitued ContactTitle with Column4, and it works just fine. I don't get it -- is there a setting that I need to flag differently or something? This goes against every guideline I know! Susan H.