client select error

3 posts, 0 answers
  1. xie yufei
    xie yufei avatar
    14 posts
    Member since:
    Sep 2009

    Posted 07 Jun 2010 Link to this post

    I used tabstrip and multipage to build tabbed view .user contents dynamic loaded .i test how to get  the value by client select row .now i encounter a  strange situation. when i open two tabs A and B,I select tab A and click a row in Grid A ,the selected value can be displayed in a textbox well.then i switch to TabB and click one row in GridB,the textbox's value  in tab a has been changed .it shows "undefined".
  2. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2285 posts

    Posted 07 Jun 2010 Link to this post

    Hello Xie,

    I suspect that you are referencing correct RadGrid when you change current Tab. Can you please post the client code for populating the value in the TextBox?

    Greetings,
    Nikolay
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. xie yufei
    xie yufei avatar
    14 posts
    Member since:
    Sep 2009

    Posted 07 Jun 2010 Link to this post

    I have found the reason.A RadWindow will be openned when double click a row,the datakey value transfer to the window by querystring.in my usercontrols ,they have the same client function,so ,when more than one ascx loaded ,these js functions confilict.
    so i add a prefix just like below.it works well.
    -------------------------------------------------------------------------------------------------------

     function Customer_RowDblClick(sender, args) {
                var cusCode = "";

                var cCode = document.getElementById('<%=customerCode.ClientID%>');
                if (cCode) {
                    cusCode = cCode.value;
                }

                var oWnd = $find("<%=EditCustomer.ClientID%>");
                var url = "CustomerEdit.aspx";
                url = url + "?cusCode=" + escape(cusCode);
                oWnd.setUrl(url);
                oWnd.show();
            }
    -------------------------------------------------------------------------------------------------------

Back to Top