Hi Steve,
I suppose you have to implement your own code to solve the
problem. You may use following logic.
When sorting
If edititemindex <> -1 then
Find PK data from edit item
Endif
Sort data source and assign it to datagrid
Find index from PK data
Assign edititemindex = the index
Call datagrid.DataBind
HTH
Elton Wang
>-----Original Message-----
>This may be a common question, however I didn't find any
posts on the issue.
>When you are editing a row of a datagrid, and then you
sort the datagrid, the
>edititemindex stays the same, which means that you are
now editing a
>different item (though the same physical row of the
datagrid). How can you
>make it so that you are still editing the same data after
you sort? As it
>is, I am simply clearing the edititemindex. (By the way,
this issue also
>applies when using the selecteditemindex.)
>
>Your help is appreciated, thank you.
>.
>