Hello everybody,
I am using a grid with Server side selection as the same as Q1,2011 release demo(Grid/Selecting/Sever-Side Row Selection).
But I added this column to RadGrid to have edit mode too.
I am using a grid with Server side selection as the same as Q1,2011 release demo(Grid/Selecting/Sever-Side Row Selection).
But I added this column to RadGrid to have edit mode too.
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
UniqueName
=
"EditCommandColumn"
>
<
ItemStyle
CssClass
=
"MyImageButton"
/>
</
telerik:GridEditCommandColumn
>
But when I click on edit ImageButton it dose not preserve the selected row states and all checkBox return to unchecked State.Is there any way to preserve the state in edit mode?
I tried to add eventHandler in ItemCreated like this
if
(e.Item
is
GridDataItem)
{
e.Item.PreRender +=
new
EventHandler(RadGrid1_ItemPreRender);
}
and
private
void
RadGrid1_ItemPreRender(
object
sender, EventArgs e)
{
((sender
as
GridDataItem)[
"CheckBoxTemplateColumn"
].FindControl(
"CheckBox1"
)
as
CheckBox).Checked = (sender
as
GridDataItem).Selected;
}
but it didnt fire at edit time.
Sincerely yours,
Bahram.