473,683 Members | 2,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data Grid Auto Size

I've been trying to find a way to auto size the columns of a data grid but
I'm having some problems with it...

I have a boolean column that are check boxes for the first column, but most
of the ways that I've found cause it to become a text column.

Does anyone have any ideas?

Karl
Jan 17 '06 #1
4 2106
Microsoft,
First you'll need to tell us whether this is an ASP.NET datagrid or a
Windows Forms DataGrid. The techniques used are different.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Microsoft" wrote:
I've been trying to find a way to auto size the columns of a data grid but
I'm having some problems with it...

I have a boolean column that are check boxes for the first column, but most
of the ways that I've found cause it to become a text column.

Does anyone have any ideas?

Karl

Jan 17 '06 #2
It is on a Windows Form (sorry!)...

"Peter Bromberg [C# MVP]" <pb*******@yaho o.nospammin.com > wrote in message
news:E3******** *************** ***********@mic rosoft.com...
Microsoft,
First you'll need to tell us whether this is an ASP.NET datagrid or a
Windows Forms DataGrid. The techniques used are different.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Microsoft" wrote:
I've been trying to find a way to auto size the columns of a data grid
but
I'm having some problems with it...

I have a boolean column that are check boxes for the first column, but
most
of the ways that I've found cause it to become a text column.

Does anyone have any ideas?

Karl

Jan 17 '06 #3
Does anyone have any idea of how to handle this without having to change the
Column type?

"Microsoft" <kc**********@h otmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
It is on a Windows Form (sorry!)...

"Peter Bromberg [C# MVP]" <pb*******@yaho o.nospammin.com > wrote in message
news:E3******** *************** ***********@mic rosoft.com...
Microsoft,
First you'll need to tell us whether this is an ASP.NET datagrid or a
Windows Forms DataGrid. The techniques used are different.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Microsoft" wrote:
I've been trying to find a way to auto size the columns of a data grid
but
I'm having some problems with it...

I have a boolean column that are check boxes for the first column, but
most
of the ways that I've found cause it to become a text column.

Does anyone have any ideas?

Karl


Jan 18 '06 #4
Nevermind, I figured it out on my own.

"Microsoft" <kc**********@h otmail.com> wrote in message
news:eC******** ******@TK2MSFTN GP10.phx.gbl...
I've been trying to find a way to auto size the columns of a data grid but
I'm having some problems with it...

I have a boolean column that are check boxes for the first column, but
most of the ways that I've found cause it to become a text column.

Does anyone have any ideas?

Karl

Jan 18 '06 #5

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

Similar topics

2
2499
by: Josef Meile | last post by:
Hi, I'm using a ComboBox, some Textboxes, and a DataGrid to represent a many-to-many relationship between Person and Course. Each time that I change the value in the ComboBox (which for now is the OID of Person), the information of the person matching the selected OID is shown in the Textboxes (Name, Address, id, etc) and the courses this person is taken are shown in a DataGrid (course name, price, etc.). This is working well so far, I...
3
2212
by: pmud | last post by:
Hi, I have a web page (asp.net, code:c#). I havean html table with text boxes. Based on the user input , records are displayed in the data grid below it. Now the datagrid has a large no. of columns. & depending on what the user enters, the data grid can grow very large. So to avoid scrolling the whole page, I just want the data grid to be scrollable. For this I used the <div> tags around the data grid, <div...
5
2780
by: tshad | last post by:
Is there a way to carry data that I have already read from the datagrid from page to page? I am looking at my Datagrid that I page through and when the user says get the next page, I have to go to the database to get the next page. Is there a way to use the dataset to allow us to read back and forth in it instead of going back to the database to get it? Thanks,
6
1721
by: Jesse Aufiero | last post by:
I was wondering if anyone knows how to get a datagrid to size as the browser is resized such that the datagrid's borders would appear anchored to the browser edges. The datagrid should have a white-space border around it and scrollbars should automatically appear on the datagrid should the contents of the grid spill outside of the viewable area. I have gotten this to work for the IE browser by placing a DIV tag around the datatable...
6
6691
by: Tejpal Garhwal | last post by:
I have datagrid filled with some data rows. At the run time i want know how many total rows are there in the data grid ? Any idea ? Any Suggestions ? Thanks in advance Tej
2
1245
by: John | last post by:
Hi I have applied auto format to a gridview. Now I would like to change the font size without effecting the rest of the auto formatting. I have tried setting the font size in grid view properties and individual column properties but it does not take any effect. How and where can I change the font size? Thanks
3
7625
by: kaczmar2 | last post by:
Hey there, I have a large image in a browser window, and I would like a way to overlay grid lines on top of the image, so a user can show the grid or hide the grid lines. The grid would cover 100% of the image, and all I would need is a set of horizontal and vertical lines over the image to create a grid overlay. Two requirements would be to:
2
2396
by: firstexact | last post by:
Hi guys, First post, hope you can help, I have done two sites www.trisant.co.uk and my own www.firstexact.co.uk. The 2 x 2 grid I originally envisaged goes haywire in Firefox as I get a 4 high by 1 wide grid. think it's something to do with my floats and clear both with a <br> in CSS..I have tried everything I can think of, the sites are fine in IE 6/7..Some of the text formatting and the navigation fonts are in different places.. Here's...
6
2731
by: slinky | last post by:
I found the following code to transfer datagrid data to an Excel file. Is this written in C#?... I'm a vb.netter. I'm just not sure where to place the code to experiment on it. Should I place it in the event handler for a form button. Is there other ways to accomplish this? I looked at some on the web and usergroups, but was confused as to the functioning. BTW my datagrid is enclosed in a <div></divfor ease of scrolling if that would...
0
8568
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9042
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8922
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8751
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 most users, this new feature is actually very convenient. If you want to control the update process,...
1
6429
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4299
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4519
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2934
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
2
2195
muto222
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.