set the width of dataGrid column

J

Joko suprianto

Hi, i want to ask how to set the width of each of the
column on the datagrid. im using vb.net
because from what i know in vb.net we have
DataGrid1.TableStyles(0).GridColumnStyles(2).width = 150
that can set the width in datagrid column, but i couldnt
use this method in asp.net

thax
 
N

Nicole Legroe

You can set the width of each column in the Property Builder of the datagrid
Define the columns you want in the Columnstab
set the width in the Formattab
 
Joined
Jan 21, 2009
Messages
1
Reaction score
0
Try this

hi,

try this line at the end of the grid data mapping

DataGridView1.AutoResizeColumns();

SM@N!.
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top