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

client select error

2 Answers 31 Views
Grid
This is a migrated thread and some comments may be shown as answers.
xie yufei
Top achievements
Rank 1
xie yufei asked on 07 Jun 2010, 05:53 AM
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 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 07 Jun 2010, 12:15 PM
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.
0
xie yufei
Top achievements
Rank 1
answered on 07 Jun 2010, 02:20 PM
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();
        }
-------------------------------------------------------------------------------------------------------

Tags
Grid
Asked by
xie yufei
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
xie yufei
Top achievements
Rank 1
Share this question
or