Hi there,
I'm currently experiencing an issue with static headers and frozen columns on a RadGrid when I replace the HTML for the RadGrid with a HTML stream from a web service which creates and renders an updated RadGrid. I know this sounds like a very odd scenario for updating the grid, but this was the design choice due to a number of other static elements we have rendered on the page which often need to be re-rendered when the widget area is resized.
I believe the issue is the result of the client-side javascript not being hooked up to the returned elements. Here's a basic scenario:
- Load a page with a widget on it which contains a RadGrid.
- Resize the widget. The resize makes a call in javascript to a web service to get an updated RadGrid.
- In the service method, a Page element is created along with a ScriptManager and a RadGrid, which are added to the page.
- The page is rendered to a text stream by calling HttpContext.Current.Server.Execute.
- The resulting text then has everything but the rendered HTML for the RadGrid removed, and is sent as the result of the service method call.
- A callback handler for the completion of the web service request then replaces the innerHTML of the widget (which was the original RadGrid) with the HTML returned from the web service.
At this point, the grid renders correctly on screen and looks fine. However, the scrolling now scrolls all data columns, including my frozen columns, and the matching column headers and footers do not move when scrolling as they would when the RadGrid is on the page from the beginning.
So, is there a good way that I can reconnect all of the client-side scripting to my returned HTML, such that it treats this HTML replacement as an actual RadGrid, along with all of the column freezing and scrolling that I get when the page is freshly loaded?
Thank you for your time,
Rich
I'm currently experiencing an issue with static headers and frozen columns on a RadGrid when I replace the HTML for the RadGrid with a HTML stream from a web service which creates and renders an updated RadGrid. I know this sounds like a very odd scenario for updating the grid, but this was the design choice due to a number of other static elements we have rendered on the page which often need to be re-rendered when the widget area is resized.
I believe the issue is the result of the client-side javascript not being hooked up to the returned elements. Here's a basic scenario:
- Load a page with a widget on it which contains a RadGrid.
- Resize the widget. The resize makes a call in javascript to a web service to get an updated RadGrid.
- In the service method, a Page element is created along with a ScriptManager and a RadGrid, which are added to the page.
- The page is rendered to a text stream by calling HttpContext.Current.Server.Execute.
- The resulting text then has everything but the rendered HTML for the RadGrid removed, and is sent as the result of the service method call.
- A callback handler for the completion of the web service request then replaces the innerHTML of the widget (which was the original RadGrid) with the HTML returned from the web service.
At this point, the grid renders correctly on screen and looks fine. However, the scrolling now scrolls all data columns, including my frozen columns, and the matching column headers and footers do not move when scrolling as they would when the RadGrid is on the page from the beginning.
So, is there a good way that I can reconnect all of the client-side scripting to my returned HTML, such that it treats this HTML replacement as an actual RadGrid, along with all of the column freezing and scrolling that I get when the page is freshly loaded?
Thank you for your time,
Rich