I have RadGridView populated and it has first column as boolean column shown as checkbox on UI. I need to disable some checkbox on RadGridview based on some data on other column (means user can't click or do any operation.) and need to select and Unselect some checkbox. I tried cellformatting event and cellClick event but no success. I treid to access checkboxelement but it don't have any check property. Please help me how to access checkbox cell element at these events. Or is there any other event???
GridViewBooleanColumn
columnA = new GridViewBooleanColumn();
columnA.HeaderTextAlignment =
ContentAlignment.MiddleLeft;
columnA.HeaderText =
"";
columnA.DataField =
"Check";
columnA.ReadOnly =
false;
columnA.Width = 20;
columnA.AllowResize =
false;
columnA.MinWidth = 20;
radDownLoadListGridView.MasterGridViewTemplate.Columns.Add(columnA);
...........................
private void radDownLoadListGridView_CellClick(object sender, GridViewCellEventArgs e)
{
if (e.ColumnIndex == 0)
{
if (radDownLoadListGridView.CurrentRow.Cells[9].Value.ToString().ToLower() == "y")
{
(radDownLoadListGridView.CurrentCell).Column.ReadOnly =
false;
((Telerik.WinControls.UI.
GridCheckBoxCellElement)(radDownLoadListGridView.CurrentCell)).IsReadOnly = false;
((Telerik.WinControls.UI.
GridCheckBoxCellElement)(radDownLoadListGridView.CurrentCell)).IsSelected = true;
}
else
{
(radDownLoadListGridView.CurrentCell).Column.ReadOnly =
false;
}
}
}