“Imagination is more important than knowledge. For while knowledge defines all we currently know and understand, imagination points to all we might yet discover and create.” - Albert Einstein


CoolGridView Quick Fixes Related to IE 6, Scrolling and UpdatePanel

I recently posted a quick fix for CoolGridView control. Below is a list of fixes.

  1. It now works correctly in Internet Explorer 6.0 and 7.0.
  2. Fixed the alignment of the fixed headers and footers when there are other HTML element or server controls before the CoolGridView in a page.
  3. 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.
Download the updated CoolControls and sample web application project from here.

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: , , , , , , , , ,

 Subscribe to feed


John Eric Sobrepena

John Eric Sobrepena
Hi, I am an I.T. professional who loves technology. I am right now into Android development. I am also a subject matter expert on C#, ASP.NET, WPF and Silverlight. Photography is one of my many hobbies.
Bookmark and Share

Type your Email

Follow me on Twitter.

Flickr Photostream



 Subscribe to feed


Powered by Blogger



© 2006 IdeaSparx | Blogger Templates by GeckoandFly.
No part of the content or the blog may be reproduced without prior written permission.