This is a migrated thread and some comments may be shown as answers.

[Solved] Get values in OnCommand event

3 Answers 226 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michal
Top achievements
Rank 1
Michal asked on 20 Oct 2009, 02:38 PM
Hi Telerik Team
Excuse me for a stupid question, but I haven't found any solution. 
I have a standard Radgrid with a standard GridEditCommandColumn and insert row option.
When I catch PerformInsert or Edit command on client side, I would like to get edited values on client side, because of my custom validation in JavaScript.

Can you help me, how do do it?

Thank you very much.

Michal 

3 Answers, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 21 Oct 2009, 06:30 AM
Hi Michal,

I recommend that you use one of the approaches for fetching values from grid cells described in the help topics below to achieve the desired by you functionality:
Extracting key values client-side
Getting cell values for selected rows client side

Regards,
Mira
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Michal
Top achievements
Rank 1
answered on 22 Oct 2009, 09:40 AM
Hi Mira,
thank you for your answer, but it isn't, what I was asking.

I need to get values from Inserted and/or Edited row. It seems to be in a different object then the one I can get with the MasterTable.get_dataItems()  or  getDataKeyValue(). These values are original values downloaded from the server and I need to get the new edited values for custom validation.

Thanks
Michal
0
Shinu
Top achievements
Rank 2
answered on 22 Oct 2009, 01:11 PM
Hello Michal,

If you are using AutoGeneratedColumns then you can use the extractValuesFromItem clientside method to retrieve the edited values. But if you are using manually added controls, you would have to access the editor controls for various columns, when the grid is in editmode or insert mode. Refer to the following code library submission which provides an example of how to retrieve editor values on client:

Thanks
Shinu.
Tags
Grid
Asked by
Michal
Top achievements
Rank 1
Answers by
Mira
Telerik team
Michal
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or