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

GGC cell validation

Hi,

I have a GGC with custom validation in the TableControlCurrentCellValidating event handler. As suggested by a few postings on similar issues, I am able to throw a custom error message in the cell by displaying an icon and suppress the message box.

I want a scenario where even if the validation fails on the column, it should display the error message on the cell(only on cell and no message box) and the user should be able to still carry on with editing the other cells in the grid control.

Please find attached an example. Please note that if I type an alphanumeric entry in the Age column, it shows me an error in the cell, so far so good. However, I am not able to move the focus out of the cell or do any other operations until I type a valid entry. I would like to change that.

Can you please suggest a way to achieve it.

Thank you.

Regards,
Vidya








GGC_CustomCellErrorMessages_2aa8ed02.zip

4 Replies

JJ Jisha Joy Syncfusion Team November 10, 2009 11:19 AM UTC

Hi Vidya,

Please fine the attached sample that shows error icon to the error cell and allows editing of other cells.

Please let me know if this helps.

Regards,
Jisha



GGCError_defbf914.zip


VN Vidya Nara November 16, 2009 04:05 PM UTC

Thank you. It works.

Vidya


VN Vidya Nara November 16, 2009 05:42 PM UTC

Hi Jisha,

Thanks for the solution. Although the solution works, Is there some other place that I can put the code instead of TableControlPrepareViewStyleInfo.

Whenever I try to edit a cell that has an invalid entry, the cell flickers continuously and is strains the eye.

Can you please suggest an alternative on how to avoid the flickering problem?


Thanks & regards,
Vidya



JJ Jisha Joy Syncfusion Team November 19, 2009 10:38 AM UTC

Hi Vidya,

The error icon is drawn in the TableControlCellDrawn event and it willl fire continuously when a cell is drawed. One way to handle this issue to have the error icon in rowheader of the error cell, so that rowheader cell will not flicker as it is static one.

Regards,
Jisha

Loader.
Live Chat Icon For mobile
Up arrow icon