CoolGridView Quick Fixes Related to IE 6, Scrolling and UpdatePanel
3 Comments Published by John Eric Sobrepena on Dec 28, 2009
I recently posted a quick fix for CoolGridView control. Below is a list of fixes.
For those who are using the CoolGridView control inside AJAX control toolkit's UpdatePanel control, make sure you have the following javascript code at the bottom portion of your ASPX page.
You can place this code in your master page if you wish. Please look at the sample web application included in the ZIP file.
- It now works correctly in Internet Explorer 6.0 and 7.0.
- Fixed the alignment of the fixed headers and footers when there are other HTML element or server controls before the CoolGridView in a page.
- Control's scroll bars are properly rendered in the browser or in a modal window after a postback, or after a callback using AJAX control toolkit UpdatePanel.
For those who are using the CoolGridView control inside AJAX control toolkit's UpdatePanel control, make sure you have the following javascript code at the bottom portion of your ASPX page.
//This javascript code is required if you are using a CoolGridView inside an update panel. function AjaxEndRequestHandler(sender, args) { var p = sender._updatePanelClientIDs; if (p != null) for (var j = 0; j < p.length; j++) { var scripts = $get(p[j]).getElementsByTagName("script"); // .text is necessary for IE. for (var i = 0; i < scripts.length; i++) { try { eval(scripts[i].innerHTML || scripts[i].text); } catch (e2) { } } } } try { Sys.WebForms.PageRequestManager.getInstance() .add_endRequest(AjaxEndRequestHandler); } catch (e) { }
You can place this code in your master page if you wish. Please look at the sample web application included in the ZIP file.
Labels: AJAX Control Toolkit, ASP.NET, CoolGridView, Fixed footer, Fixed header, GridView, IE 6, Scrollable, Scrolling, UpdatePanel
Good work! Thanks! Just a little problem with FF 3.0.16: the header don't scroll horizontal with the other rows.
Thanks from Italy!
I made some minor change to fix the issue that you encountered on Firefox 3.0.16. You can download this release again: CoolGridView Quick Fix
Can we freeze the first column while scrolling horizontally?
Any help is highly appreciated....