Hi all,
I need help with this code:
DataAdapter1.Fill(DataSet1);
DataSet1.Tables[0].DefaultView.Sort = "sortcolumn";
BindingSource1.DataSource = DataSet1.Tables[0].DefaultView;
After execution, the "DataSet1.Tables[0].DefaultView.Sort" property is reset to empty string.
What might be the cause of this, and how can this be avoided?
Thanks
Loading
Akkiraju IvaturiPosted Sep 10, 2012, 7:17 PM
JorgePosted Sep 10, 2012, 6:03 PM
I just deleted the initialization for the Sort property from the designer code (I suppose you can't set the value to null from the designer window).
Issue is solved.
JorgePosted Sep 10, 2012, 5:15 PM
The data is loaded, there is a DataGridView bound to the BindingSource1 and it shows what it should exactly, except the SortedColumn property is null (as a consequence of the underlying DataView.Sort property being reset to empty string).
Any other suggestions?
Akkiraju IvaturiPosted Sep 10, 2012, 5:03 PM
Check the following code that I have created to provide you the example: