473,396 Members | 2,082 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Datagrid Columns

Hi,

It's selly, but how can I set the width of a column in the datagrid, and to
hide a column!!!?
thanks
--
Regads,
Rochdi
Nov 21 '05 #1
4 1347
"Mike" <Mi**@discussions.microsoft.com> schrieb:
how can I set the width of a column in the datagrid
<URL:http://msdn.microsoft.com/library/en-us/dv_vstechart/html/vbtchformattingwindowsformsdatagridvisualbasicprim er.asp>
-> "Setting Column Width"

and to hide a column!!!?


Customizing the Windows Forms DataGrid
<URL:http://msdn.microsoft.com/library/en-us/dnwinforms/html/wnf_custdatagrid.asp>
-> "Customization 1: Columns and Column Order"

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2
Rochdi,

http://www.windowsformsdatagridhelp....6-3300b2215049

I hope this helps,

Cor

"Mike" <Mi**@discussions.microsoft.com> schreef in bericht
news:1A**********************************@microsof t.com...
Hi,

It's selly, but how can I set the width of a column in the datagrid, and
to
hide a column!!!?
thanks
--
Regads,
Rochdi

Nov 21 '05 #3
That's a good example but in my case I have the datagrid already to a dataset
DataGrid1.DataSource = ds.Tables(0)
and I would just to hide one of the columns in my DataGrid1,
I tried this before binding it: ds.Tables(0).Columns.Remove(columnName),
I think it removes it from the table in the dataset and I don't want that I
want only to hide in the datagrid but available in ds.Tables(0).

--
Regads,
Rochdi
"Cor Ligthert [MVP]" wrote:
Rochdi,

http://www.windowsformsdatagridhelp....6-3300b2215049

I hope this helps,

Cor

"Mike" <Mi**@discussions.microsoft.com> schreef in bericht
news:1A**********************************@microsof t.com...
Hi,

It's selly, but how can I set the width of a column in the datagrid, and
to
hide a column!!!?
thanks
--
Regads,
Rochdi


Nov 21 '05 #4
Rochdi,

Did you search furter on our website?
(however than not the columnwidth therfore I showed this one before)

http://www.windowsformsdatagridhelp....3-a3539697edbd

I hope this helps,

Cor
Nov 21 '05 #5

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

Similar topics

0
by: Reb | last post by:
I am using a datagrid within another datagrid. My second datagrid is expand/collapse one. I am facing some error. This is my code. ExpandGrid.aspx <form id="Form1" method="post"...
2
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...
1
by: Amber | last post by:
The DataGrid allows you to make columns visible or invisible on demand - even edit and other special columns. This article will show you how it is done. Some developers have reported problems...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
4
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a...
2
by: CSL | last post by:
I am using the DataGrid in a Windows Application, how can I adjust the widths of each column individually.
7
by: CanoeGuy | last post by:
I have been trying for the last two weeks to display a dynamic DataGrid. The data that I'm pulling from a SQL Server DB will have whole columns that will be either NULL or 0. I want to display...
1
by: jimb | last post by:
I can get the dropdownlist into the datagrid, and I can populate it, but I can't read it. Anybody have a working example of a dropdownlist in an editable grid? Thanks. -- .....
7
by: Arpan | last post by:
Assume that a database table has the following 4 columns - ID, UserID, Subject & Marks. I am retrieving the records existing in this DB table & displaying them in a DataGrid like this: <script...
3
by: rn5a | last post by:
A SqlDataReader is populated with the records from a SQL Server 2005 DB table. The records retrieved depends upon 2 conditions (the conditions depend on what a user selects in an ASPX page). If...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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...

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.