Jump to content
  • Advertisement
Sign in to follow this  
Alex Baker

[.net] Problem with.net/C# DataGrid, it's placement and size

This topic is 4860 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello, i've encountered a small problem regarding the .net/C# DataGrind control: it seems to me, that i'm unable to control how the DataGrid should behave when it's not filled with enough rows/lines of a source; example: - i'm placing the grid in the designer at a size of, let us say, 600px * 300px - i'm setting a font size of "X-small"; i'm assuming this should be nough for at least 10 - 15 lines of data (approximation only, not sure how many lines this will be exactly) - i'm testing the DataGrid ect. with a source containing 20 - 30 rows; it's working fine; height of the row's is also OK. ...but: - if i'm now filling these DataGrid with wonly 1 or 2 rows, row height is blown up completely: the complete 600px * 300px area is filled only with the header line and the 1 (or 2) source lines, but it is still eating up the complete 600px * 300px area, resulting in single rows with a height of 100px :-? (i hope this explanation was not too complicated? if there are any questions, i could post a screenshot) so...all i want is the DataGrid staying at a continuous row-height, not depending on how many rows are bound to it; is this possible ? thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement

found the solution:

if a developer has entered a height in the property page of the designer, the control is always having this height, even if there is only a 2-row-datasource bound to it; removing this fixed height in the designer fixed this problem.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!