We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Problem in Grid Events during cell validation

Hi,
I''m doing validation on a cell(say Column1) in grid control using the event CurrentCellEditingComplete. If validation fails, i want the user to stay in the current cell(column1). But when the user types some content in the current cell(column1) and clicks on radio button of other cell(column2), it makes the radio button selected eventhough the current cell''s validation fails.


5 Replies

AD Administrator Syncfusion Team September 29, 2006 11:46 AM UTC

Hi Sanath,

You can use the CurrentCellValidating event to resolve this issue. Please refer to the below KB article [ What are the different validation events and event members? When are they triggered and how are they used? ] for more details on Validation of a cell.

http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=340

Thanks,
Haneef


SV Sanath Vijayakumar September 29, 2006 12:49 PM UTC

Hi Haneef,
Problem still occurs.

As per your suggestion, i tried with CurrentCellValidating and it works fine, when i try to go out of that cell with invalid data in current cell. But again, when i try to click on a radio button on another cell, it selects the radio button and come back to current cell. I don''t want radio button to be checked in other cells when current cell is invalid.

If other cells doesn''t have radio button, then your suggestion works fine.

Thanks in advance.

Cheers,
Sanath


SV Sanath Vijayakumar September 29, 2006 01:26 PM UTC

Hi Haneef,
If you require more information from me, please let me know.

I tried with all possibilities of using events such as CurrentCellValidating, CurrentCellEditingComplete, CurrentCellDeactivating,etc. But the problem seems to be there only for Radio buttons in other cells. hope you understand my problem.


SV Sanath Vijayakumar September 29, 2006 03:06 PM UTC

Haneef,
Any luck?


AD Administrator Syncfusion Team October 3, 2006 06:49 AM UTC

Hi Sanath,

You can handle the QueryCellInfo event and set Clickable proerty of the GridStyleInfo to false. Below is a code snippet.

private void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
if(!isValid && e.Style.CellType == "RadioButton" )
{
e.Style.Clickable = false;
}
}

Sample : http://www.syncfusion.com/Support/user/uploads/GDBG_RadioButton_27521869.zip

Thanks,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon