Welcome Guest Search | Active Topics | Sign In | Register

How to disable a row in a grid? Options
Roger Jordan
Posted: Monday, November 25, 2013 7:43:35 AM
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
eo_support
Posted: Monday, November 25, 2013 9:49:11 AM
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!
Roger Jordan
Posted: Monday, November 25, 2013 9:55:49 AM
Rank: Member
Groups: Member

Joined: 12/29/2008
Posts: 29
Great idea! Thanks, I will try to do this.

Best regards,
Roger


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.