I have a employee details form.In a grid there are multiple entries with respect to Employee id.For one employee if grid details the user should be restricted to select only one check box.If he tries to select more than one check box then remaining check box to be disabled automatically.Like overall only one check box to be selected reamining to be disabled
Thanks for the response.But the check box will be dynamic.Like when user inserts a line in the GRID ,the check box also adds accordingly.So probably i need to write a loop through all the check box make all disabled and only the selectedd check box to be enabled.Please give me a sample how to loop adn in which method to be written.
Thanks for the response but the above wil not be the case.Since check box are dynamically populated.like its a check box field in grid.When the user inserts single like teh check box also adds with it.So we need to loop for the number of check box and disable all teh checkbox other than one check box which is selected by the user.there night b n number of check box.Here user is restricted to select only 1 check box and others will eb automatically disabled
Thanks for the code…The code is working but still after checking to C2 its getting locked means i am not able to recheck the C1 value…what to do to remove this locking…
if (Check2.value()== NoYes::Yes)
{
TableName.Field1 = NoYes::No;
TableName.Field2 = NoYes::Yes;
check1.enabled(true); // if u give true it wont lock , if u give false it will lock
ret = super();
}
There might be N number of check boxex in my code…not a specified number check box.It has to dynamically uncheck all the check boxes when any single check box is checked.
Were you able to get a resolution for this? I am facing the same issue. I have a enum type field in the table and the field is added to a grid in a form. Now I can have many rows in the grid, which effectively means many checkboxes. Now as per the requirement if I mark any 1 checkbox then all the other checkboxes should get disabled. Not sure how to achieve this. Any help on this would be really great.