EventArgs undefined

2 posts, 0 answers
  1. tommy
    tommy avatar
    1 posts
    Member since:
    Mar 2014

    Posted 01 Oct 2014 Link to this post

    I have configured my RadGrid to call a client side function and call an AJAX script to insert records into my dB. 
    I am successful at calling my Client Side JS function by utilizing the <clientevents onrowclick=RowClick> event.

    <ClientEvents OnRowClick="RowClick" />  *** This works but it is not my ideal solution

     I would like to call this function by the execution of the onblur event from a textbox control.

    I have tried the code below but I am not having any luck:
    <telerik:GridTemplateColumn HeaderText="Qty" AllowFiltering="false" UniqueName="Column2">
    <telerik:RadTextBox ID="qty" runat="server" AutoPostBack="True">
    <ClientEvents OnBlur="function(sender,args){RowClick(sender,args)}" />

    However, when I execute the Onblur event I get this error:   

    JavaScript runtime error: Object doesn't support property or method 'get_id'

    I assume that this is due to the fact that it doesn't know the ROW id when inside of the textbox?

    Any help is appreciated!
  2. Viktor Tachev
    Viktor Tachev avatar
    1768 posts

    Posted 03 Oct 2014 Link to this post


    If you would like to get the id of a row using the Blur event of a RadTextBox control you could use the following approach. Find the row element that contains the textbox and access its id attribute. You could use jQuery to find the element easier. Check out the code snippets below for illustration:

    <telerik:GridTemplateColumn HeaderText="Qty" AllowFiltering="false" UniqueName="Column2">
            <telerik:RadTextBox ID="qty" runat="server" AutoPostBack="false">
                <ClientEvents OnBlur="onBlur" />


    function onBlur(sender, args) {
        var parentRowId = $telerik.$(sender.get_element()).closest("tr")[0].id;

    Viktor Tachev

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top