473,545 Members | 2,047 Online
Bytes | Software Development & Data Engineering Community
+ 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.Table Styles(0).GridC olumnStyles(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 2208
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*******@disc ussions.microso ft.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.Table Styles(0).GridC olumnStyles(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*******@disc ussions.microso ft.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.Table Styles(0).GridC olumnStyles(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
3361
by: Prateek | last post by:
Hi, How can I change the width of a column in datagrid control? TIA Prateek
1
1983
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 streches the whole datagrid accross the screen. Has anyone else ever experienced this problem and is there any way of fixing it. Basically my datagrid is...
2
1706
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
3934
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 selection column on the left. I have the widths of the columns. What other values do I need to include in the DataGrid width? Thanx,
0
1567
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 if set to 208, it changes to 206. On changing width of column I am resizing the width of grid. I am using mouse down and mouse up events for this....
24
10736
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 non-negative and less than the size of the collection. Parameter name: index"" I have tried, -1,0,1,2 for the index, and I get the same error message...
1
2141
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 code in the "ItemDataBound" -- which I belive should allow me to alter the width of the cells, however it does not work. Dim unitWidth As Unit...
1
2473
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 far everything is fine. Now i try to format the embedded datagrid - e.g. setting font size and the column size/width of each column. Everything is...
3
4670
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 button will be dynamic and always show up on the same Y-axis position as the selected row. So, how do I get back the X, Y co-ordinates of a...
2
10383
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 actually happens is... when the Text size is too big... the column
0
7664
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7436
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5981
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5341
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1897
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 we have to send another system
1
1022
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
715
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.