“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


Render ASP.NET GridView Control with Resizable Column Header

Make the column headers of ASP.NET GridView control user-resizable with this three easy steps.
  1. Download the JavaScript file from here.
  2. Include the JavaScript file into your ASPX page.
  3. Finally, initialize the component for your GridView control by inserting this JavaScript code at the end of your ASPX page.
    var _ResizeTableHeaderDecorator = new ResizeTableHeaderDecorator({ GridID: "<%=GridView1.ClientID %>" });
    Replace "GridView1" by the ID of the GridView control you want to enable column resizing.
It's that easy. It is tested to work with IE 8, Firefox 3.5, Safari and Chrome. This feature will soon be integrated with CoolGridView ASP.NET control. Here is a live example.
Column 1
Column 2
Column 3
Column 4
Column 5
Column 6
Column 7
Orange
Orange
Drive Sample
Great
Orange
Gateway
Gateway
Apple Drive
Doorway
Apple
Drive
Apple
Orange Doorway
Drive Sample
Great Apple
Gateway Gateway
Apple
Drive
Apple
Sample Drive
Sample Orange
Gateway
Doorway Doorway
Great
Great
Great Orange
Orange Doorway
Doorway Drive
Drive
Sample
Apple
Gateway
Apple Great
Orange Great
Orange Gateway
Gateway
Sample Drive
Sample Drive
Apple Apple
Orange Gateway
Drive
Gateway
Great Drive
Gateway
Drive
Great Doorway
Doorway
Orange
Doorway Sample
Gateway
Doorway
Great Doorway
Great Orange
Sample Doorway
Orange Apple
Sample
Drive
Great Gateway
Apple Apple
Gateway Orange
Drive
Gateway
Drive
Drive
Drive
Orange
Drive
Great
Doorway
Great Sample
Great Sample
Sample Sample
Drive Sample
Apple Great
Great Sample
Gateway Orange
Great
Great
Orange Gateway
Apple Doorway
Great Gateway
Drive
Apple Great
Great Great
Orange
Great
Apple Sample
Great Drive
Doorway
Doorway
Great Great
Orange
Drive
Doorway
Doorway
Gateway
Drive
Doorway Drive
Orange Gateway
Sample Apple
Apple Orange
Orange Gateway
Sample
Drive
Great Orange
Doorway Drive
Orange
Apple Doorway
Sample Orange
Orange
Sample
Apple Great
Gateway
Gateway Orange
Apple Apple
Gateway Apple
Great Orange
Doorway Great
Great
Doorway
Sample
Great Gateway
Drive Apple
Great
Orange Great
Orange Sample
Sample Great
Apple
Sample Sample
Doorway Apple
Gateway
Orange
Apple Doorway
Sample
Drive
Great Orange
Sample
Doorway Gateway
Doorway
Orange Apple

Labels: , , , , , , , , , , ,

 Subscribe to feed

3 Responses to “Render ASP.NET GridView Control with Resizable Column Header”

  1. # Anonymous Anonymous

    Hi John,

    Great extension for Gridview.
    Getting design time error when dropping component to design window:

    error rendering control

    at runtime it is working fine.  

  2. # Anonymous Anonymous

    couldnt found the Javascript in the link and the Live example does not have the property either..  

  3. # Anonymous Anonymous

    Hi, John
    How do I freeze the first column ??  

Post a Comment


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.