Click here to Skip to main content
15,888,301 members
Articles / Web Development / HTML
Article

Scrollable Resizable Datagrid

Rate me:
Please Sign up or sign in to vote.
2.71/5 (17 votes)
3 Nov 2004 80.8K   1.3K   44   11
Based on an MSDN Article, I've changed an HTC to be able to scroll and resize the contents of a datagrid.

Sample Image - Scroll_Resize_Datagrid.jpg

Description

This article is based on an MSDN article.

It is basically an HTC file attached to a DataGrid that rebuilds it, fixing headers, inserting a scroll for the contents. The only difference between this one and the MSDN article is that I’ve added the possibility to stretch the div containing the contents of the DataGrid.

You just need to attach a CSS Style to the DataGrid and define Bodyheight like in the webfom1.aspx file in the source.

I would like to thank the Web Team from MSDN, Mark Davis, Heidi Housten, Jay Allen and Tosh Meston for producing the start of this article.

Updates

  1. Fixed on move out of the window problem.
  2. Added double click event on the resize button to reset to the original position.
  3. Added tooltip on the resize button to explain functionality.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Portugal Portugal
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Generallink for msdn & project is not working Pin
rama charan10-Dec-07 3:45
rama charan10-Dec-07 3:45 
hi Pedro ,
The link for MSDN and also the project are not working..
Even after i downloaded the application and bound data to datagrid -its not loading at runtime..

or Pls make it clear how to run the application also

thanks for ur effort..

Rama Charan Prasad

"Be happy and Keep smiling.Thats what u want be always..Smile | :) "

Generalimage buttons on grid vanishing [modified] Pin
Madhu Kampurath23-May-06 20:29
Madhu Kampurath23-May-06 20:29 
GeneralbodyHeight - unknown element of DataGrid Pin
FinallyInSeattle24-Apr-06 11:26
FinallyInSeattle24-Apr-06 11:26 
QuestionDoesnt display properly when the datagrid is empty Pin
Cavebaby18-Jan-06 20:37
Cavebaby18-Jan-06 20:37 
Questiondoes't workwell for gridview Pin
Phani Sirigala25-Aug-05 20:50
Phani Sirigala25-Aug-05 20:50 
GeneralDoesn't work with a DataGrid using an absolute position ... Pin
bruno_calderan18-Aug-05 2:11
bruno_calderan18-Aug-05 2:11 
GeneralDynamic Columns Pin
Nigel Stratton20-May-05 7:37
Nigel Stratton20-May-05 7:37 
GeneralCROP text in datagrid Pin
coolvaas16-Apr-05 9:17
coolvaas16-Apr-05 9:17 
GeneralRe: CROP text in datagrid Pin
Pedro Maia Costa19-Apr-05 22:13
Pedro Maia Costa19-Apr-05 22:13 
GeneralNão funciona Pin
felipedrumond5-Nov-04 5:21
felipedrumond5-Nov-04 5:21 
GeneralRe: Não funciona Pin
Pedro Maia Costa12-Nov-04 1:03
Pedro Maia Costa12-Nov-04 1:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.