Rank: Member Groups: Member
Joined: 12/29/2008 Posts: 29
|
Hi, i'm using a grid, the first column is a checkbox. On filling the table, I select some rows by setting the value of the checkbox cell. I want to disable these selected rows to prevent the user from deselect these rows. I found a way not to show the checkbox by using the style attribute, but I like to show the checkbox in checked status but disabled. Any way to do so?
Thanks in advance for your help.
Best regards, Roger
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi, You can do something like this:
Code: HTML/ASPX
<eo:CheckBoxColumn ClientSideEndEdit="on_end_edit">
</eo:CheckBoxColumn>
Code: JavaScript
function on_end_edit(cell, newValue)
{
//Always return the old value, discard the new value
return cell.getValue();
}
The code handles the GridColumns' ClientSideOnEndEdit event. Inside the handler it always return the old vlaue, thus discarding the new value. Thanks!
|
Rank: Member Groups: Member
Joined: 12/29/2008 Posts: 29
|
Great idea! Thanks, I will try to do this.
Best regards, Roger
|