Welcome Guest Search | Active Topics | Sign In | Register

how to disable checkbox Options
Arthur
Posted: Monday, March 15, 2010 6:35:55 AM
Rank: Member
Groups: Member

Joined: 2/9/2010
Posts: 21
Hi,
I have checkbox column in a grid.
The initial FullRowMode=True.
User can check the checkbox,even I set the the readonly=true for checkbox column.

Can any method to avoid user to check checkbox?
eo_support
Posted: Monday, March 15, 2010 10:12:27 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You will need to handle the CheckBoxColumn's ClientSideEndEdit to return the original value:

Code: HTML/ASPX
<eo:Grid ....>
    <Columns>
        ....
        <eo:CheckBoxColumn ClientSideEndEdit="end_edit_handler" .....>
        </eo:CheckBoxColumn>
        ....
    </Columns>
</eo:Grid>


Code: JavaScript
function end_edit_handler(cell, newValue)
{
    //Return the original value to ignore the changes
    return cell.getValue();
}


Thanks!
Arthur
Posted: Monday, March 15, 2010 9:49:32 PM
Rank: Member
Groups: Member

Joined: 2/9/2010
Posts: 21
Hi,
Thanks for your solution.

But I change FullRowMode=False after click a button, checkbox can't be checked any more.

Would you show me FullRowMode is true or false how to change checkbox can be checked or not ?
eo_support
Posted: Tuesday, March 16, 2010 9:41:32 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Isn't disabling the checkbox (so that you can no longer check it) what you wanted?

Thanks!
Arthur
Posted: Tuesday, March 16, 2010 9:25:41 PM
Rank: Member
Groups: Member

Joined: 2/9/2010
Posts: 21
Hi,
I set FullRowMode=true at page load,the checkbox can't be checked.
I put a button tol change the FullRowMode to false,
I wish the checkbox can be checked when FullRoMode=false(after click the button).
And there is another button will change FullRowMode to false, the checkbox will not be checked again.
eo_support
Posted: Tuesday, March 16, 2010 11:13:39 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We have already told you:

1. How to make the checkbox enabled (not put the additional code in);
2. How to make the checkbox disabled (put the additional code in);

You will need to write the necessary code to combine different scenarios/settings to fit your own need. We will not be able to provide any code that is specifically related to your business/application logic.

Thanks


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.