J
John Wilson
I am still working away to get to grips with .NET web forms. Can anyone help
me with these conundrums?
How do I programmatically control the with of a datagrid itself and the
columns in it? At the moment my grid is wider than the columns, leaving a
spare bit to the right, and yet some of my columns are too narrow. Can I
even get them to adjust automatically, eg to the width of the widest cell
value?
Also, how do I get numeric data to display correctly? The data comes from a
sql query. I want it to display to 2 decimal places even if ".00", but at
the moment I can't get it to give me those extra zeros whatever I do.
I also had a problem figuring out how to right align the columns of figures.
I fiddled with the GUI and managed this, but more by accident than design
and I still don't know how I did it. In any event for future reference I
want to know how to do it programatically.
Has anyone any tips?
me with these conundrums?
How do I programmatically control the with of a datagrid itself and the
columns in it? At the moment my grid is wider than the columns, leaving a
spare bit to the right, and yet some of my columns are too narrow. Can I
even get them to adjust automatically, eg to the width of the widest cell
value?
Also, how do I get numeric data to display correctly? The data comes from a
sql query. I want it to display to 2 decimal places even if ".00", but at
the moment I can't get it to give me those extra zeros whatever I do.
I also had a problem figuring out how to right align the columns of figures.
I fiddled with the GUI and managed this, but more by accident than design
and I still don't know how I did it. In any event for future reference I
want to know how to do it programatically.
Has anyone any tips?