Hello,
I have a grid that is bound to a datatable.
I want the user to be able to move an item ( row )
in the grid up or down.
So I created an Up and Down button and in the
UP button i basically do the following :
indx = grid.currentrowindex;
I create a new record in the recordset and
than i copy the fields from the currently selected
record over...
wavRow["Name"] = this.campaign.Data.AUWave.Rows[indx]["Name"];
wavRow["Description"] = this.campaign.Data.AUWave.Rows[indx]["Description"];
wavRow["TypeCD"] = this.campaign.Data.AUWave.Rows[indx]["TypeCD"];
I than delete the record in the record set...
//Remove the current row
this.campaign.Data.AUWave.Rows.RemoveAt(indx);
and than i INSERT the new ( saved record ) into
the recordset ....
This seems to work IF you are looking at the datatable and the rows, the record is in the new postion, one up from its previous position...
The problem seems to be that the grid is not refreshing ...
Is there a better way to move the records up or down in
a grid ???
-ter