I would like use a datagrid to display the content of my datatable in the
same order it appears in my datatable. My datatable has no key value.
I begin by clearing my existing datable using the datatable.clear method,
then I fill my datatable using the dataadapter.fill method,
then I add some rows at different location in my datatable using
datatable.Rows.InsertAt method,
finally, I bind my datatable to my datagrid using
datagrid.SetDataBinding(myDataset,"mytable")
When I execute the code for the very first time, it works well. However, if
I execute it again, the datagrid shows the content sorted by the column as
it appears from left to right. The datagrid.refresh method doesn't change
nothing.
Any help will be appreciated.
Thanks.
|