Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to set the width of datagrid columns with code? 1

Status
Not open for further replies.

rs51

Technical User
Oct 13, 2001
163
PT
i'm a beguinner and want to stablish the width of a datagrid columns;as that cant be done using the properties, how can i do that with code?
thanks
 
You can use the llngColWidth = object.colwidth(Index) to discover the with of a cell. And to change it use object.colwidth(Index) = <Width>
 
tx for your help;
i kept getting an error when i made datagrid1.colwidth
but that gave me an idea that worked perfectly!!!!:
DataGrid1.Columns(&quot;NameOfColumn&quot;).Width = whatever you want
works!
tx again

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top