Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
395
SelectedRowEventArgs event is always fired when PostBack
posted

Hi,

I'm facing a problem with SelectedRowEventArgs event. I have 2 UpdatePanels on a page:

- UpdatePanel1 contains WebDataGrid1 and WebDataGrid has SelectedRowEventArgs  event

- UpdatePanel2 contains WebDataGrid2

- Change row of WebDataGrid1, the event SelectedRowEventArgs will be fired and reload data for WebDataGrid2

But when i click on any button of UpdatePanel2 to make the PostBack, the SelectedRowEventArgs  of WebDataGrid1 is always fired. How can i prevent this?

Thanks,

Nam Dang

Parents
No Data
Reply
  • 37874
    posted

    Hello Nam,

    Do you have Ajax enabled on the grids? Have you set the RowSelectionChanged AutoPostBackFlag to true? Can you share some code, showing your setup? I would suggest you to check if the first grid posts back on RowSelectionChanged. If it does not, then the RowSelectionChanged event will be fired on the button click in the second UpdatePanel if it causes a full postback.

    Hope this helps.

Children