Posted 10 May 2020, 12:03 pm EST
The ValidateEdit event fires when I finished edit of a cell but I need that fire only when I finish the edit of all cells of the row. Is this possible?
Forums Home / ComponentOne / WinForms Edition
Posted by: psergio.p on 10 May 2020, 12:03 pm EST
Posted 10 May 2020, 12:03 pm EST
The ValidateEdit event fires when I finished edit of a cell but I need that fire only when I finish the edit of all cells of the row. Is this possible?
Posted 10 May 2020, 3:38 pm EST
Hi Paulo,
You can use the RowValidated and RowValidating event for validating the row when it loses focus.
https://www.grapecity.com/componentone/docs/win/online-flexgrid/C1.Win.C1FlexGrid.4.5.2~C1.Win.C1FlexGrid.C1FlexGridBase~RowValidated_EV.html
Regards,
Prabhat Sharma.
Posted 11 May 2020, 7:31 am EST
Prabhat thank you a lot.
Other question, Is possible to determine if row is updated when it loses focus?
Thanks
Posted 11 May 2020, 6:17 pm EST
Hi Paulo,
You can use the combination of CellChanged and RowValidated events to achieve the same. It is implemented in the attached sample, please have a look.
Regards,
Prabhat Sharma.
FlexGridValidateEditDemo.zip
Posted 18 May 2020, 12:32 am EST
Hi Prabhat, the CellChanged fires when I change Cell in the Grid but I need to determine if the information of Cell is changed.
I need to determine if one or more Cells of row is modified.
Posted 18 May 2020, 2:49 pm EST
Hi Paulo,
The CellChanged event of FlexGrid fires only after the contents of a cell has changed. So you can take a temp boolean variable to determine that the content of one or more cells has changed in the RowValidated event.
https://www.grapecity.com/componentone/docs/win/online-flexgrid/C1.Win.C1FlexGrid.4.5.2~C1.Win.C1FlexGrid.C1FlexGridBase~CellChanged_EV.html?highlight=cellchanged%2C
I have implemented the same in the last attached sample, please have a look.
Regards,
Prabhat Sharma.