Datagrid with fewer records than page size is ugly

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using a datagrid bound to a Dataset. The problem is when the dataset has fewer records than the page size for the height, the cells grow automatically. Thus the datagrid with one record grows the cell heights between the one data row and the header row to match the whole datagrid height. Is there any easy way to fix the cell sizes to the same as if there were pagesize records, and the rest of the datagrid would be blank? In it's current state it's very ugly. Thanks in advaince.
 
remove the height setting on the datagrid property pages. Then contract the
datagrid as small as it can go. That will prevent it from stretching to fit.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Charlie Dison said:
I am using a datagrid bound to a Dataset. The problem is when the dataset
has fewer records than the page size for the height, the cells grow
automatically. Thus the datagrid with one record grows the cell heights
between the one data row and the header row to match the whole datagrid
height. Is there any easy way to fix the cell sizes to the same as if
there were pagesize records, and the rest of the datagrid would be blank? In
it's current state it's very ugly. Thanks in advaince.
 
Back
Top