I have a Kendo UI grid where the first column is readyonly:
In edit mode this is just fine, but if I want to add a new row/item then of course the firstName should be editable.
How I can get this working?
I tried to find a 'best practice' but seems to be not so easy.
Is there any 'best practice'?
Thanks a lot!
11 Answers, 1 is accepted
thanks again, I solved it now this way:
This creates also the original look and feel if in edit mode, whic means there is no border and no input field anymore.
Just if someone is interested in,
In the current scenario you should make the column editable by default. Then you should bind to the edit event of the Grid, determine whether the current item is new and make the input readonly if needed.
the Telerik team
Sorry for the inconvenience. The solution, provided in the previous answer will work only for the Kendo UI MVC grid, where each input field receives an id attribute equal to the column name. In Kendo UI Web Grid you could get the current input field via it's name attribute.
Wish you a great day!
the Telerik team
When a server binding is used, the Grid does not fire most of the client events, including the edit event. In the current scenario you could achieve this on document ready and get the current grid mode through the URL get parameter "Grid-mode".
As demonstrated in the example, you could get the window container through it's ID, which follows the pattern GridID + PopUP.
I wish you a great day!
I would suggest the following Knowledge Base article on this topic:
I hope this will help achieve the required behavior.
Kind Regards,Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
I am glad that the provided approach is a working decision for the needs of your application.
If further assistance is needed, do not hesitate to contact me and the team.
Тhe web is about to get a bit better!
The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.