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

Stuck with client side databinding - Telerik/Princy please help ASAP

2 Answers 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Arun
Top achievements
Rank 1
Arun asked on 04 Mar 2009, 04:57 PM

I have a grid which loads 10 columns * 30 rows by default.

Based on a tabstrip selection, I want to rebind the grid with data fetched using JSON serialization. Everything is OK until the OnSuccess method where the correct result is returned.

Do note that the result can bring in variable number of columns (either a subset of default or totally new columns) -- say for my first tab click, 6 totally new columns are returned along with 30 rows.

In this case the following does *NOT* work -- basically it does not reset the state of the grid & its underlying master table view on the client side. And I'm unable to manually set the .innerHTML of the cells since iterating through the columns of the master view accessed by get_masterTableView() contains the column collection loaded by default.

 

 

function updateGrid(result, userContext, methodName)

 

{

 

    tableView.set_dataSource(result);

    tableView.dataBind();

}

Please suggest a workaround as to how I can reset the state to 6 cols * 30 rows ?

Thanks a lot 
- Arun 

2 Answers, 1 is accepted

Sort by
0
Arun
Top achievements
Rank 1
answered on 04 Mar 2009, 05:34 PM
Vlad -

Any ideas/links/posts I can look at ?

Thanks
- Arun
0
Nikolay Rusev
Telerik team
answered on 09 Mar 2009, 07:56 AM
Hello Arun,

I am afraid that RadGrid with client-side data-binding does not support binding to variable data structure.
If you recreate RadGrid on server when the structure, column types or data fields, change you will be able to bind it on client-side.

Best wishes,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Arun
Top achievements
Rank 1
Answers by
Arun
Top achievements
Rank 1
Nikolay Rusev
Telerik team
Share this question
or