views:

15

answers:

1

I have the following datatable with the ordering of DataClassIndex column before editting:

DataclassIndex 0 1 2 3 4

When I start modifying some other cells in this datatable, the ordering of DataClassIndex column changes to something like this

DataclassIndex 3 4 2 1 0

How can I modify a datatable content without altering the original order of the datatable.

A: 

If you're getting this data from a database somewhere, you'll want to create a "primary key" column and sort by the primary key. The order should then always be the same.

Rice Flour Cookies
This has nothing to do with the database. This is just about manipulating the datatable, and its ordering gets messed up because of the modifications of the cells in the datatable.When I tried to modify some data in the datatable, the ordering of rows get changed. DataClassIndex is the name of the column in the datatable which contains the index of the rows of the datatable. Again, changing the data for some cells in the datatable alters the ordering of rows in the datatable which is not what I want. Thanks
bathoi