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
50
FormView not updating when row changes
posted

I have a master detail situation using a  WebDataGrid that is bound to an ObjectDataSource and a FormView that is bound to a seperate ObjectDataSource. When the page first loads, the Grid and FormView both display correctly, but as the user selects rows the FormView does not update.

 I have the grid set to fire a server side row selected event when the row changes. When the row changes I get the key from the selected row and then set it on the parameter of the ObjectDataSource that the FormView is bound to. When I step through the code the event fires, I get the key I am expecting, the class method fires and returns the dataset with the record I am expecting, but the screen does not update. I have tried it with and without the UpdatePanel but the page does not seem to redraw.

I am in Visual Studio 2010, .NET 4.0 with IE8. Any help would be appreciated.

Parents
  • 2783
    Verified Answer
    posted

    Hi,

    WebDataGrid by default works with AJAX enabled,  and when you update your FormView in the WebDataGrid's event, only WebDataGrid is going to update/repaint since it is the control that caused the callback.  Try putting both the WebDataGrid and the FormView into the UpdataPanel and setting WebDataGrid's EnableAjax property to false.

    Thanks,
    Olga

Reply Children
No Data