I want to configure a validator so that when I fill a cell with a correct value and leave the cell, that cell should be locked and not be touched again. The problem is how to mark those cells that are read only and how to save a list so that with every call every user has the read only cells.
3 Answers, 1 is accepted
0
Vladimir Iliev
Telerik team
answered on 02 Jul 2014, 06:40 AM
Hi Stefan,
From the provided information it's not clear for us what is the exact scenario that you have - could you please provide the current grid code that you are using? This way we will get better overview of the exact setup that you have and advice you better if the required behavior is possible in your case and how to proceed.
Regards,
Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
I cannot provide a code sample since it is WIP for a customer plus it is in MS CRM hence it needs a local database and customizing and so on.
But I can try and elaborate my problem a bit more.
So I have a field, if the input of that field matches with lets say an entry of an array I want that field to be disabled for editing when the user leaves that field. Short example, I have a Product Name field and I want to disable the input when the user has typed in a valid Product Name that was found in an array of products, or in a database for example. So if you add a new record then type in a valid Product Name and you leave the cell, then the validator should go and check if it is a valid Product Name or not, if it is, the user should not be able to change it again.
Reason behind this is, I have a product in MS CRM, and that product is a part of an salesorderdetail, when you create a salesorderdetail with a product it automatically gets certain properties from the product, but if I update the salesorderdetail with a different product that does not update those prefetched values hence, I end with wrong product properties so I need to prevent updating of products.
0
Accepted
Vladimir Iliev
Telerik team
answered on 03 Jul 2014, 08:59 AM
Hi Stefan,
The desired behavior is not supported out of the box and it will require custom solution based entirely on you and the exact setup that you have.
For example you can define custom validation rule (in dataSource schema.model.fields.fieldName.validation) in which to perform your custom check and if the current editor should be locked to include current row ID and current field name in global variable. Then for example using the "edit" event of the grid you can disable/remove the needed editors based on the variable created in previous step.
Regards,
Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!