473,473 Members | 2,215 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

set the width of dataGrid column

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
Nov 19 '05 #1
5 2201
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

"Joko suprianto" <an*******@discussions.microsoft.com> schreef in bericht
news:66****************************@phx.gbl...
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

Nov 19 '05 #2
But i want to set it dynamically, do you know how to do
it?
-----Original Message-----
You can set the width of each column in the Property Builder of the datagridDefine the columns you want in the Columnstab
set the width in the Formattab

"Joko suprianto" <an*******@discussions.microsoft.com> schreef in berichtnews:66****************************@phx.gbl...
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

.

Nov 19 '05 #3
Hi i have the same problem
did you find an answer to youre question?.
From http://www.developmentnow.com/g/8_20...rid-column.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Dec 8 '05 #4
Hi i have the same problem
did you find an answer to youre question?.
From http://www.developmentnow.com/g/8_20...rid-column.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Dec 8 '05 #5
Hi i have the same problem
did you find an answer to youre question?.
From http://www.developmentnow.com/g/8_20...rid-column.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Dec 8 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Prateek | last post by:
Hi, How can I change the width of a column in datagrid control? TIA Prateek
1
by: Stephen | last post by:
I have a datagrid and i'm trying to fix the width of one of the columns to be exactly 300px. My problem is that one of the records fields(CompanyName) is really long and has no spaces so it...
2
by: Hajash | last post by:
hi all, how do i set the width of a column in a datagrid.Please help.Thanks in advance. regards, hajash
9
by: web1110 | last post by:
Hi y'all, I have resized the columns in a DataGrid and I want to set the width of the DataGrid to fit the columns. Just summing the column widths is too short due to the grid and gray row...
0
by: Lalit Bhatia | last post by:
Hi, In Datagrid, while setting width of column through GridColumnStyles collection. width does not set to exact width that I am setting in my code. If I set width to 13, it is changed to 130 or...
24
by: Mike L | last post by:
This is for a Win form, in C# 2005. I want to load a datagrid, make some columns width 0, and then clean out the record I added. I get the error message, ""Index was out of range. Must be...
1
by: martin | last post by:
Hi, I have a datagrid that contains 3 colums. This is rendered to the page fine, except that I would like to be able to control the width of each table cell of the datagrid I have the following...
1
by: Drew | last post by:
Hey, thanks in advance for helping me out with my problem: I have a datagrid which is embedded in another datagrid. The datagrid is filled directly by a dataset generated from a sql query. So...
3
by: Aziz | last post by:
1. I have a shopping basket DataGrid with a list of products. What I want to do is when the user clicks on a row, a button will become visible/be created that allows user to edit the quantity. The...
2
by: Charleees | last post by:
Hi all, I have a DataGrid with Template Columns..... There are LAbels,Linkbuttons in the Single Row.. I have to set the Constant Column width for those Template Columns in Grid... Wat...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.