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

Problem with Javascript API

5 Answers 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 09 Aug 2011, 11:10 AM
Hello,

Iam using RadGrid for listing some data grom DB... I need change some values on client using your API. I am using this code:
<telerik:RadScriptBlock>
            <script type="text/javascript">
                 var mySelectedGrid;
                var mySelectedGrid_MasterTableView;
 
                function GetGridObject(sender, eventArgs) {
                     var _mySelectedGrid = sender;
                    mySelectedGrid = $find(_mySelectedGrid.ClientID);
                    mySelectedGrid_MasterTableView = mySelectedGrid.get_masterTableView();
                 }
             </script>
        </telerik:RadScriptBlock>

If I debugging page in Firefox Firebug tool i cant see Rows in Mater table view. "mySelectedGrid.MasterTableView.Rows" writing "undefined". I was trying this on several of our projects and have some results.

Please, can you help me to find where is problem?

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 09 Aug 2011, 12:48 PM
Hello Daniel,

Try accessing the RadGrid as shown below.
Javascript:
function GetGridObject(sender, eventArgs)
{
        var grid = $find("<%=RadGrid1.ClientID %>");
        var MasterTable = grid.get_masterTableView();
}


Thanks,
Princy.
0
Daniel
Top achievements
Rank 1
answered on 09 Aug 2011, 01:25 PM
Hello Princy,

I tryed several ways to resolve it. Your solution was one of these.

Now i tryed it again and unfortunately it does not help.

Thank you for your help.
0
Pavlina
Telerik team
answered on 12 Aug 2011, 08:15 AM
Hello Daniel,

Please go through the following help articles and see if they help to resolve the problem.
Getting cell values for selected rows client side
Getting RadGrid client object

Kind regards,
Pavlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Daniel
Top achievements
Rank 1
answered on 24 Aug 2011, 09:01 AM
Hello Pavlina,

unfortunately it does not help, still same error... Have some other idea?

Thanks
0
Pavlina
Telerik team
answered on 25 Aug 2011, 01:14 PM
Hello Daniel,

Can you please open a formal support ticket and send us a simple runnable project illustrating the problem, so we can check it locally and advice you further.

Best wishes,
Pavlina
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Grid
Asked by
Daniel
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Daniel
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or