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
655
EditorProviders added in code behind not working after postback
posted

I have a user control which contains a WHDG. This grid has a few basic properties set in the .aspx file. All of the columns, behaviors, editorproviders, etc... are added in the code behind.

Things work great the first time the page loads, however on a postback, such as a Save button click, the grid gets reloaded but all of the editors seem to get out of whack.

One post recommends applying the behaviors to the Grid.GridView, however this doesn't seem to work. When I try this, none of the EditingBehaviors appear to be getting created, even on the first page load.

Another post suggests that Editors/Behaviors added at runtime need to be reinstaniated on each postback. Following this approach doesn't seem to make any difference.

When I view source on the first grid and compare against the same grid after postback, everything seems to be there. However there is additional HTML that appears to be setting my editors to hidden. Which means something must be triggering the HierarchicalGridRender to emit this additional HTML. Either I am missing a property or something is null causing the HTML to get triggered during rendering.

 

 

 

 

 

 

Parents
No Data
Reply Children