This question is locked. New answers and comments are not allowed.
Hi!
We are using the grid component successfully, but have a some pages where we want users to be able to edit _some_ of the fields after addition (the others should be read only). For example for one class we have multiple properties, but only want the user to be able to edit the name once created. How would you suggest solving this problem?
Thank you
/Victor
We are using the grid component successfully, but have a some pages where we want users to be able to edit _some_ of the fields after addition (the others should be read only). For example for one class we have multiple properties, but only want the user to be able to edit the name once created. How would you suggest solving this problem?
Thank you
/Victor
6 Answers, 1 is accepted
0
Accepted
Hello Victor,
Atanas Korchev
the Telerik team
If you are using ajax editing you can hook up to the OnEdit client-side event and hide/disable the html elements which are not needed. The event args of the OnEdit event expose a field which tells what the current mode is - edit or insert.
Regards,Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Victor
Top achievements
Rank 1
answered on 03 Dec 2010, 08:00 AM
Hi!
That's actually quite nice of an idea... Since we use server-side events as fallback, are there any ways to achieve similair results there? I suppose we could do a custom editor template with branching based on some viewmodel variable, but we are kind of hoping there is a more straight-forward way.
Thanks
/Victor
That's actually quite nice of an idea... Since we use server-side events as fallback, are there any ways to achieve similair results there? I suppose we could do a custom editor template with branching based on some viewmodel variable, but we are kind of hoping there is a more straight-forward way.
Thanks
/Victor
0
Accepted
Hi Victor,
Atanas Korchev
the Telerik team
Currently branching in the editor template is the only option for server binding. Perhaps you can check if the Model value is default (null or some other value) to determine whether in insert or edit mode. Or check the query string for the Grid-mode parameter (which kind of violates the MVC paradigm but will work 100%).
Regards,Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Michael
Top achievements
Rank 1
answered on 04 Apr 2011, 02:33 PM
Sorry to "drop in" on this thread, but i was about to ask the same question.
Im afraid the "hook on to" comment requires a little more explanation for this bear??
with thanks
Michael
Im afraid the "hook on to" comment requires a little more explanation for this bear??
with thanks
Michael
0
Hi Michael,
Atanas Korchev
the Telerik team
Could you please clarify what needs further explanation? Handling the OnEdit event should be straightforward. The linked help topic shows a sample implementation.
Regards,Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Michael
Top achievements
Rank 1
answered on 05 Apr 2011, 05:05 AM
missed the link...sorry