Hi Team,
I'm using telerik grid in one of my windows form. First column is a GridViewCheckBoxColumn and it has checkbox in the header column as well and user can check/uncheck every row manually either by clicking on the checkbox or anywhere on the row(I've written code on the CellClick event to check/uncheck the checkbox). The header checkbox behaves fine if I check/uncheck the row's checkbox but if I click on row it won't check/uncheck the header checkbox. Below is the code written in Cellclick event of the grid:
private
void
dgvManageBill_CellClick(
object
sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
if
(e.RowIndex >= 0 && dgvManageBill.CurrentRow !=
null
)
{
if
(e.Column.Name !=
"columnSelectAll"
)
{
dgvManageBill.CurrentRow.Cells[
"columnSelectAll"
].Value = !Convert.ToBoolean(dgvManageBill.CurrentRow.Cells[
"columnSelectAll"
].Value);
}
}
}
I thought of accessing the row's checkbox object and then setting its checked state instead of setting the cell value but I'm unable to find the checkbox in the cell. Is there any other way to achieve above requirement? I've been stuck on this quite a long now, will really appreciate some help!
Thanks
Amit