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

Gridview in XmlHttpPanel

1 Answer 88 Views
XmlHttpPanel
This is a migrated thread and some comments may be shown as answers.
Mansi
Top achievements
Rank 1
Mansi asked on 11 Jan 2010, 06:30 AM
Hi,

I am using a grid view inside XmlHttpPanel.
My issue is regarding call back.
Above the grid, there is one dropdown list and one radiobuttonlist, and on their selectedindexchanged event, client side, I am setting the value of the panel, and it binds the grid at server side.

For the first time say, it is binding the grid from the database and all works well, then I change the value in dropdownlist, so it again binds the grid according to the value selected in dropdown.
Additionally, I have one button below the grid, on its click event at server side, I am generating a datatable and storing it in a session. The issue creates when I press that button.
Now I am pressing the button below the grid. This does the post back (which opens a popup to show preview of the grid), and it  rebinds the grid (on the parent page) again without calling the .databind() - and that is which it bound before from the database .

XmlHttpPanel, does not support this kind of scenario ?

1 Answer, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 12 Jan 2010, 03:51 PM
Hi Mansi,

I am not sure that I completely understand your scenario, but please consider the following information and if it does not help please send us a fully working project (you must open a support ticket to be able to attach files, or you can paste the full source code in this thread)  that demonstrates the problem and we'll do our best to provide a working solution.

The XmlHttpPanel uses client callbacks (or WebService) to update its content. This means that the page will not go through its full life-cycle when its content is loaded, as in the case with AJAX postbacks. Additionally there is no ViewState, so if you perform a postback the content inside the XmlHttpPanel might be lost (or inconsistent). I have created a sample project (attached to the thread) to demonstrate this. It has a GridView which is updated by the XmlPanel on a button client-click. Then after a postback to the server the content of the GridView is lost, because there is no ViewState.

For additional info read the XmlHttpPanel's online documentation.

Greetings,
Pero
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
XmlHttpPanel
Asked by
Mansi
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or