Saturday 19 May 2012

How to access the control from itemtemplate in Radgrid on client side

You get control from itemtemplate in Radgrid by below methods.

// Method1
var ChkSelect =  $(row.get_element()).find("input[id*='ChkSelect']").get(0);
// Method2
var ChkSelect = $telerik.findControl(row.get_element(), "ChkSelect");
// Method3
var ChkSelect = row.findControl("ChkSelect"); 
For how to access row from radgrid check this link.

6 comments:

  1. Sandeep Sheokand17 May 2013 at 02:07

    You should use findElement method, to find any asp.net control from radgrid item template.

    row.findElement("ChkSelect");

    ReplyDelete
  2. Method 1 was very useful. Searching for this code for more than a day.

    $(row.get_element()).find("input[id*='ChkSelect']").get(0);

    Thanks

    ReplyDelete
  3. hi!
    I need to find a hiddenfield a radgrid mode edit (EditMode = "EditForms")

    use this for the textbox (but does not work with hiddendfield):

    var grid = $find("<%=RadGrid1.ClientID %>");
    var ctrl_hiddenfield = $telerik.findControl(grid.get_element(),"hiddenfield_name");

    none of the methods worked to find an asp:hiddenfield

    help me please.






    ReplyDelete
  4. Please check this article "http://jayeshgoyani.blogspot.in/2012/07/access-radgrid-on-client.html" and let me know if you want any help.

    Also provide your code here or post your question in forum and provide link here.

    ReplyDelete
  5. Hi
    This is my telerik grid when the radcombobox is selected that data will be stored in the database as well as it will be displayed in the page where it can be edited but i want that same data to be to be fetched and printed in PDF can anybody tell me the solution for this.
    Below is the code snippet
    Thank You in advance



    <%#DataBinder.Eval(Container.DataItem, "Event_Type_Desc")%>





    ReplyDelete
  6. it really helped.
    Thanks

    ReplyDelete