pro_imaj Posted October 3, 2022 Share Posted October 3, 2022 Hello When I set UnidbGrid RowEditor := True, all colons ReadOnly := True values can be changed. As a solution to this, putting the relevant components on the UniHiddenPanel and matching each colon solves the problem, but this is a very laborious way and I don't want to add unihidden panel to the fields I will display only. Is there an easy way to do this? In the attached example; Double click on any field in the grid, then try to make changes in the Salary field, which is ReadOnly, and you will see that the change has been made. GridEditors - Row Editor.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 3, 2022 Share Posted October 3, 2022 Hello, Which build are you using? On the latest build I couldn't reproduce. Quote Link to comment Share on other sites More sharing options...
pro_imaj Posted October 3, 2022 Author Share Posted October 3, 2022 6 minutes ago, Sherzod said: Hello, Which build are you using? On the latest build I couldn't reproduce. A new build came out today, I didn't install it, I don't know if it's fixed, I'll upload it and let you know. The structure I am using now: 1.90.0.1563 Quote Link to comment Share on other sites More sharing options...
pro_imaj Posted October 3, 2022 Author Share Posted October 3, 2022 28 minutes ago, Sherzod said: Hello, Which build are you using? On the latest build I couldn't reproduce. @Sherzod I tried the latest version and I still have the problem. Salary field is ReadOnly so it cannot be edited! 20221003_150613.mp4 Quote Link to comment Share on other sites More sharing options...
pro_imaj Posted October 3, 2022 Author Share Posted October 3, 2022 I expect it can't be edited at all, whereas it allows editing but does not save this edit when saving. Quote Link to comment Share on other sites More sharing options...
Denton Posted October 3, 2022 Share Posted October 3, 2022 I noticed this behavior too when using row editor. as for my solution, i did this too: 1 hour ago, pro_imaj said: As a solution to this, putting the relevant components on the UniHiddenPanel and matching each colon solves the problem Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 3, 2022 Share Posted October 3, 2022 35 minutes ago, pro_imaj said: I expect it can't be edited at all, whereas it allows editing but does not save this edit when saving. Try this approach: UniDBGrid1.ClientEvents.ExtEvents -> function beforeedit(editor, context, eOpts) { if (editor.isRowEditor) { var form = editor.getEditor().form; form.getFields().each(function(field){ if (field.column.rdonly) { field.disable() } }) } } 1 Quote Link to comment Share on other sites More sharing options...
pro_imaj Posted October 3, 2022 Author Share Posted October 3, 2022 31 minutes ago, Sherzod said: Try this approach: UniDBGrid1.ClientEvents.ExtEvents -> function beforeedit(editor, context, eOpts) { if (editor.isRowEditor) { var form = editor.getEditor().form; form.getFields().each(function(field){ if (field.column.rdonly) { field.disable() } }) } } @Sherzod Thank you for the answer. This is how my problem was solved. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.