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

Rebind updates dataset but grid not redrawn

2 Answers 87 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Salva Mas
Top achievements
Rank 1
Salva Mas asked on 12 Jul 2011, 05:14 PM
I've got this structure
MasterPage -With a "Search button"
Normal page with a Grid and some combos to filter.
When I change the combos and press the "Search button" fires an event that goes to a Grid.rebind(), that event goes through NeedDataSource and changes the dataset and rebind the datasource, as far as I checked the dataset is OK with the correct values filtered by the combos, but the grid is not redrawn, then it isn't showing the correct data.

I've got in the managerproxy grid is refreshing grid.

How can I adress this issue?

Thanks in advance

2 Answers, 1 is accepted

Sort by
0
Accepted
Iana Tsolova
Telerik team
answered on 15 Jul 2011, 10:52 AM
Hello Salva,

Does the Search button perform ajax request or regular postback? If it performs ajax and you are using RadAjaxManager to make it ajax initiator, you should add a setting where the Search button updates the grid. This can be done on Page_Load or Page_PreRender of the content page dynamically:
protected void Page_PreRender(object sender, EventArgs e)
{
    Control btnSearch = Page.MasterPage.FindControl("Search_Button_ID_here");
    RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(btnSearch, RadGrid1);
}


Best wishes,
Iana
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Salva Mas
Top achievements
Rank 1
answered on 18 Jul 2011, 04:19 PM
I only had to change the radajaxmanager for the radajaxmanagerproxy and worked fine for me.
Thanks for your help!!
Tags
Grid
Asked by
Salva Mas
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Salva Mas
Top achievements
Rank 1
Share this question
or