1

I invoke one function in javascript. When I call this function rad grid row is already in edit mode. In that function I get reference to RadGrid:

var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();

In edit mode I have edit item:

I have a problem here to get/set value of txtName from this javascript function. I have tried:

var item = masterTable.selectItem(masterTable.get_dataItems()[0].get_element());
var item = masterTable.selectItem('txtName');
var item = masterTable.selectItem('txtName').Text;
var item = masterTable.selectItem('txtName').value;
var item = masterTable.selectItem(3)

In all cases item is undefined. Any idea what am I doing wrong here?

2
  • Are you able to find the grid before moving on to the master table view? That is, if you do var grid = $find('<%= RadGrid1.ClientID %>');, do you get a defined object? Commented Mar 15, 2012 at 13:01
  • Yes when I try to find grid I got reference to it. I just can't get values out of edit item. Commented Mar 15, 2012 at 13:21

1 Answer 1

1

you could try this bit of jQuery to find it:

var item = $telerik.$(masterTable.get_element()).find('input[id*="txtName"]')[0];

some details on Telerik Jquery: http://www.telerik.com/help/aspnet-ajax/introduction-using-jquery.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.