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

FindControl from RagGrid InsertTemplate using client-side API

1 Answer 114 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Smruti Ranjan
Top achievements
Rank 1
Smruti Ranjan asked on 27 Nov 2012, 11:26 AM
I have a RadGrid having inplace NEW row at its footer. I need to get and set the controls inside this InsertTemplate using the Telerik client-side API. I am using the below code to get the InsertedItem using client-side API :-

var masterTable = grid.get_masterTableView();
var insertedItem = masterTable.get_insertItem();
But trying to get the RadNumericTextBoxBox control from this InsertedItem like below :-
var txtUnits = insertedItem.findControl("rntbItem");
(here rntbItem is a RadNumericTextbox control name used in the InsertTemplate of the grid.)
throws a javascript error like findControl() method is not supported with this insertedItem element.

Can anybody help me out in this regard.

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 28 Nov 2012, 04:33 AM
Hi,

Try the following javascript to access controls in InsertItemTemplate.
JS:
function insert()
{
       var grid = $find("RadGrid1");
       var editForm = $telerik.$(".rgEditRow")[0];
       var txt = $telerik.findElement(editForm, "rntbItem");
}

Thanks,
Shinu.
Tags
Grid
Asked by
Smruti Ranjan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or