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

[Solved] Get edit/insert form values client side

1 Answer 68 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Peter Forney
Top achievements
Rank 1
Peter Forney asked on 26 Jan 2010, 05:42 PM
I am looking for help to get the values from the auto generated edit form client side.   I am currently capturing the command event "PerformInsert" but I do not know how to get the value the user typed into the edit field.

//Insert command 
 else if (args.get_commandName() == "PerformInsert") {
                    var MasterTable = $find("<%=RadGrid1.ClientID %>").get_masterTableView();
                    itemID = -1
                    insertLineItem(itemID, MasterTable);
                }

With a column defined as:
<telerik:GridNumericColumn DataField="Qty" HeaderText="Qty" EditFormColumnIndex="0" />

How would I get its NEW value so I can build my JSON obj to pass to my data service.
Looking for a snippet to do this:

var qty == (some code to get the value of the edit form for Qty);

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Peter Forney
Top achievements
Rank 1
answered on 27 Jan 2010, 04:34 PM
I am still looking for a better solution but this is what I got to work in the mean time if it can help anyone else:

Added a Uniquename to the qty column of "Qty".  Using a JQuery selector I can get the value using this snippet:

var qty = $("input[name*='Qty_text']")[0].value;
Tags
Grid
Asked by
Peter Forney
Top achievements
Rank 1
Answers by
Peter Forney
Top achievements
Rank 1
Share this question
or