C
cr113
I'm trying to set the column widths for a datagrid. You'd think it
would be easy. I looked it up in google and the first thing I found
looked promising:
datagrid1.columns(0).width = 2000
datagrid1.columns(1).width = 1000
Except that there is no such things as a columns collection in a
datagrid.
Another person suggested right clicking on the datagrid, clicking
properties, and then clicking Layout. That sounded promising except
that there is no Layout option.
My .NET book says to right click the datagrid and then select Property
Builder. Cool! Oops! There is no Property Builder option.
The only other thing I found is to somehow add a datagridtextboxcolumn
object to a datagridtablestyles object and then add that to my datagrid
and that is supposed to somehow set the column width. My first attempts
had no effect on changing the columns but at least I didn't get any
syntax errors. But I can't imagine it would be this complicated to
simply set the column width.
Help!!!!
would be easy. I looked it up in google and the first thing I found
looked promising:
datagrid1.columns(0).width = 2000
datagrid1.columns(1).width = 1000
Except that there is no such things as a columns collection in a
datagrid.
Another person suggested right clicking on the datagrid, clicking
properties, and then clicking Layout. That sounded promising except
that there is no Layout option.
My .NET book says to right click the datagrid and then select Property
Builder. Cool! Oops! There is no Property Builder option.
The only other thing I found is to somehow add a datagridtextboxcolumn
object to a datagridtablestyles object and then add that to my datagrid
and that is supposed to somehow set the column width. My first attempts
had no effect on changing the columns but at least I didn't get any
syntax errors. But I can't imagine it would be this complicated to
simply set the column width.
Help!!!!