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

Grid is getting out of sync or Sort is not working

1 Answer 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Imtiaz
Top achievements
Rank 1
Imtiaz asked on 12 Aug 2008, 07:32 PM

I have treeview control onclick on the child node I wand to populate the radGrid and it has a sorting functiolity.
OnClick of Node this method is called.

 
public void PageSelectionChanged(long pageID)  
{  
    ViewState["PageID"] = pageID;  
 
    radPageVersion.ReBind()  

 I have on onNeedDataSource set. In needDataSource event I am calling a private method which calls Stores Proc with node ID as parameter. The problem is Node click event  (PageSelectionChanged) is excecuted after NeedDataSource and rebind does not rebineds the grid and that is causing  Node and and grid gets out of sync.

If I enableVeiwState it works fine on node click but when I click on header to sort does not work the grid gets empty NeedDatasource does not fires.

 How can I make it work where I should be able to update grid onclick of some other controls and make sorting work?

Thanks
Imtiaz

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 15 Aug 2008, 10:34 AM
Hello Imtiaz,

Attached to this message, is a sample application, which handles the requested functionality.
I hope this helps.

Greetings,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Imtiaz
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or