Datagrid with fewer records than page size is ugly

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.
 
A

Alvin Bruney [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top