FindControl from RagGrid InsertTemplate using client-side API

2 posts, 1 answers
  1. Smruti Ranjan
    Smruti Ranjan avatar
    22 posts
    Member since:
    Feb 2012

    Posted 27 Nov 2012 Link to this post

    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.
  2. Answer
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 27 Nov 2012 Link to this post


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

Back to Top