all groups > asp.net datagrid control > october 2006 >
You're in the

asp.net datagrid control

group:

GridView - fixed row height


GridView - fixed row height Greg Smith
10/3/2006 1:05:22 PM
asp.net datagrid control:
I am learning to use the Asp.Net 2.0 GridView. When I page of filter the
data and end up with a page with less than the full page size of rows then
the header and the displayed rows "stretch" to fill the GridView.



I would like to have the row height remain the same and just display a blank
space below the data. How is this done?





Any help is greatly appreciated.

Re: GridView - fixed row height Tim_Mac
10/4/2006 9:05:15 PM
hi Greg,
you probably have a 100% height setting on the gridview. otherwise check if
your stylesheet has any settings that could be in effect for the gridview.
i've never seen the behaviour you describe on a gridview before.

let me know if this doesn't sort it out.
tim


[quoted text, click to view]

Re: GridView - fixed row height Rob Morton
10/27/2006 12:14:47 PM
If you specify the "Height=" of the grid then when it displays it will fill that height 100% regardless of the number of rows, resulting a half mix between the header and the row or rows. Use a div tag to specifiy the max height of the grid and don't assign the grid "Height" and scroll options.
---
Re: GridView - fixed row height cloudoversea
12/13/2006 8:42:08 PM
do not give gridview's height a value, it works. gridview dynamically generates row height for each page
---
AddThis Social Bookmark Button