I need to enable/disable a checkbox that is in edit mode. I have tried in PreRender and ItemDatabound to FindControl but have not found a way. I do have access to the data for the decision of enable/disable.
Any help is appreciated
<telerik:RadGrid ID="RadGridUserRole" DataSourceID="ObjectDataSourceUserRole" AllowMultiRowEdit="True"
OnPreRender="RadGridUserRole_PreRender" runat="server" Width="205px" AutoGenerateColumns="False"
GridLines="None">
<MasterTableView CommandItemDisplay="none" EditMode="InPlace" AutoGenerateColumns="false"
Width='100%' DataKeyNames="RoleName">
<Columns>
<telerik:GridTemplateColumn HeaderText="Role" HeaderStyle-Width='65px' UniqueName="Role">
<EditItemTemplate>
<asp:CheckBox ID="CheckBoxRole" Checked='<%# Eval("UserInRole") %>' Text='<%# Eval("RoleName") %>' runat="server" />
</EditItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
public void RadGridUserRole_PreRender(object sender, System.EventArgs e)
{
foreach (GridItem item in ((RadGrid)sender).MasterTableView.Items)
{
if (item is GridEditableItem)
{
GridEditableItem editableItem = (GridDataItem)item;
editableItem.Edit = true;
}
}
((RadGrid)sender).Rebind();
}