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

RadGrid and Update Panels

1 Answer 40 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
PATRICIA SEIFERT
Top achievements
Rank 1
PATRICIA SEIFERT asked on 26 Aug 2011, 01:56 PM
I have a RadGrid in UpdatePanel1 and a Listbox and a Button in Updatepanel2.

The button in UpdatePanel2 adds items to the listbox.
 
What I'm not understanding is why when I click the button in Updatepanel2 it runs the click event and then triggers the RadGrid.NeedDataSource sub routine.Shouldn't the the click event in Updatepanel2 only post back and refresh the controls in that updatepanel?


1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 31 Aug 2011, 07:54 AM
Hello Patricia,

Note that even when you have AJAX on the page, the whole page lifecycle is executed, so if you have a call to Rebind() in PreRender for example, the grid would still fire its NeedDataSource event. Also, if its ViewState is turned off, NeedDataSource will fire on each execution of the page lifecycle.

Greetings,
Tsvetina
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Ajax
Asked by
PATRICIA SEIFERT
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or