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

Rebind method not refreshing Radgrid

4 Answers 365 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kelly
Top achievements
Rank 1
Kelly asked on 11 Jun 2014, 01:58 PM
Hi team,

We have a radgrid and using needdatasourceand. We have implemented paging on to it.
So we have a search button and we click on to it radgrid displays the content from datatable. We click on 2nd page and it displays 2nd page result. Up to here its perfectly fine. Now issue comes when we are on 2nd page and we click on search button, datatable correctly populates but radgrid still shows the 2nd page result.

Expected result should show the Ist page as new search was initiated.

protected void searchMe_Click(object sender, EventArgs e)
    {
                radgrid1.DataSource = null;
                radgrid1.Rebind();      
    }

Datatable which is to be binded on button search click has the correct data in it but we don't know why this is showing the 2nd page data. Paging is working perfectly fine and we can go from one page to another with the correct data. Issue is when we click the search button after we navigate to 2nd or 3rd page, radgrid does not refreshes with the correct data.

Please help ASAP as this is extremely urgent.

4 Answers, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 16 Jun 2014, 08:42 AM
Hello Kelly,

Based on the provided information it is hard to say what is causing the described issue. Can you please post you aspx markup code with the related code behind file.
Additionally do you have a RadAjaxManager, RadAjaxPanel or asp:UpdatePanel which is used in order to ajaxify the RadGrid. If you have can you please try commenting it and let me know if the issues still persist.

Looking forward for your reply.

Regards,
Radoslav
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Kelly
Top achievements
Rank 1
answered on 17 Jun 2014, 04:15 AM
This got resolved by adding setting currentpageindex in page_indexchange method of radgrid.
0
ReyVillarosa
Top achievements
Rank 1
answered on 28 Apr 2016, 12:47 AM

Hello Telerik team,

Appreciate your help. I have 2 radgrids, say header and detail grids. A click on a row on header grid will trigger a refresh on the detail grid. I wanted to invoke this activity from code-behind (c#). Please help.

Thank you.

 

 

0
Radoslav
Telerik team
answered on 02 May 2016, 07:34 AM
Hello,

Can you please elaborate a bit more on your requirement? What do you mean by “invoke this activity from code-behind”?
Also on the following link you can find an example of master details grids:
http://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/master-detail/defaultcs.aspx

Please check it out and let me know if it helps you.

Looking forward for your reply.

Regards,
Radoslav
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Grid
Asked by
Kelly
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Kelly
Top achievements
Rank 1
ReyVillarosa
Top achievements
Rank 1
Share this question
or