or
RadGrid1.EditIndexes.Add(i);
for each appropriate row.
However, if the user sorts the rows, the rows are reordered but the EditMode status of each row does not follow the data. If row 3 was editable, then row 3 is still editable even though it has different data in it.
I tried moving RadGrid1.EditIndexes.Add(i) to different events and nothing worked.
I noticed that the only two events that I can find that occur after the actual sorting is ItemCreated and ItemDataBound. In those events, neither RadGrid1.EditIndexes.Add(i) or e.Item.Edit = true cause IsInEditMode to be true in ItemDataBound.
How can I set the EditModes correctly on rows after sorting has been done?
<div style=
"float: left; margin-left: 30%;"
>
<asp:Button runat=
"server"
ID=
"btnFirst"
CommandName=
"Page"
CommandArgument=
"First"
Text=
"First"
Enabled=
"<%#Container.CurrentPageIndex > 0 %>"
Font-Size=
"10px"
/>
<asp:Button runat=
"server"
ID=
"btnPrev"
CommandName=
"Page"
CommandArgument=
"Prev"
Text=
"Prev"
Enabled=
"<%#Container.CurrentPageIndex > 0 %>"
Font-Size=
"10px"
/>
<span style=
"vertical-align: top; position: relative; top: 4px"
>Page
<%#Container.CurrentPageIndex + 1 %>
of
<%#Container.PageCount %>
</span>
<asp:Button runat=
"server"
ID=
"btnNext"
CommandName=
"Page"
CommandArgument=
"Next"
Font-Size=
"10px"
Text=
"Next"
Enabled=
"<%#Container.CurrentPageIndex + 1 < Container.PageCount %>"
/>
<asp:Button runat=
"server"
ID=
"btnLast"
CommandName=
"Page"
CommandArgument=
"Last"
Font-Size=
"10px"
Text=
"Last"
Enabled=
"<%#Container.CurrentPageIndex + 1 < Container.PageCount %>"
/>
</div>