Title: Cell data validation for "cellediting" Post by: officecode on March 17, 2019, 08:04:38 AM I set the validation property for each column in the datagrid. Now I want that when the current cell data fails validation, other cells cannot enter the edit by clicking.
I did this with the following code: Code: var editcell; This seems to have achieved the goal. However, when the first column of cells fails validation, although the data returned to it has already met the requirements, I can find it difficult to click and edit other cells. Please help me improve the code, thank you! Title: Re: Cell data validation for "cellediting" Post by: jarry on March 17, 2019, 11:57:35 PM This is the built-in feature. Please refer to the code below:
Code: $('#dg').datagrid({ Title: Re: Cell data validation for "cellediting" Post by: officecode on March 18, 2019, 04:05:08 AM thanks for the reply. I know the usage of this column attribute. The key now is that I don't want other cells to be selected when validation fails.
As shown below: Title: Re: Cell data validation for "cellediting" Post by: jarry on March 18, 2019, 09:25:25 AM Please look at this example http://code.reloado.com/igerod3/edit#preview. When the validation fails, it doesn't allow to edit other cells.
Title: Re: Cell data validation for "cellediting" Post by: officecode on March 18, 2019, 05:06:15 PM Please look at this example http://code.reloado.com/igerod3/edit#preview. When the validation fails, it doesn't allow to edit other cells. Thank you, jarry, you have given me a lot of help, thank you very much! I saw this example and it really is fine. The problem is that if you change the datagrid to edatagrid, it doesn't work: it will still go into editing when you click on another row or other cell. I now want to use cell-editing in edatagrid, because edatagrid has saveUrl, updateUrl and other attributes, it is more convenient. |