473,471 Members | 4,124 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

C# DataGrid Row and Column

Hi,

Are there methods to get how many rows and columns in a C# DataGrid?
Thanks for help.
Jason
Jan 10 '07 #1
3 4932
I use the VisibleRowCount and VisibleColumnCount, but not sure if this is
accurate enough!

"Jason Huang" <Ja************@hotmail.com¼¶¼g©ó¶l¥ó·s»D:ur****** **********@TK2MSFTNGP06.phx.gbl...
Hi,

Are there methods to get how many rows and columns in a C# DataGrid?
Thanks for help.
Jason

Jan 10 '07 #2

Hi there are count properties for both : -

datagridview.rows.count
datagridview.columns.count

hth
Gary.

On Jan 10, 11:06 am, "Jason Huang" <JasonHuang8...@hotmail.comwrote:
I use the VisibleRowCount and VisibleColumnCount, but not sure if this is
accurate enough!

"Jason Huang" <JasonHuang8...@hotmail.com¼¶¼g©ó¶l¥ó·s»D:urNh%23S KNHHA.4...@TK2MSFTNGP06.phx.gbl...
Hi,
Are there methods to get how many rows and columns in a C# DataGrid?
Thanks for help.
Jason- Hide quoted text -- Show quoted text -
Jan 10 '07 #3
Thanks Gary.
But I am using VS2003 which doesn't have the DataGridView on my C# Windows
Form project.
Is there a method to include the DataGridView component to my VS2003, so I
can use the DataGridView?
"Gary" <ga********@myway.com>
???????:11*********************@p59g2000hsd.google groups.com...

Hi there are count properties for both : -

datagridview.rows.count
datagridview.columns.count

hth
Gary.

On Jan 10, 11:06 am, "Jason Huang" <JasonHuang8...@hotmail.comwrote:
I use the VisibleRowCount and VisibleColumnCount, but not sure if this is
accurate enough!

"Jason Huang" <JasonHuang8...@hotmail.com>
¼¶¼g©ó¶l¥ó·s»D:urNh%23SKNHHA.4...@TK2MSFTNGP06.phx .gbl...
Hi,
Are there methods to get how many rows and columns in a C# DataGrid?
Thanks for help.
Jason- Hide quoted text -- Show quoted text -

Jan 11 '07 #4

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

Similar topics

5
by: Jean Carlo | last post by:
Hello guys I`m developing a windows form that contain one Datagrid. In this datagrid I insert a checkBox Column. I need to get all rows where checkbox is checked by user. How do I get this...
3
by: PeterZ | last post by:
Hi, In a running C# app with a datagrid control I select all rows in the dataGrid using CTRL-A, I then paste into some other app like notepad or Word but the column headings get left off. Is...
0
by: optimizeit | last post by:
What I am attempting to do is import an Excel Workbook and display the worksheets in a datagrid dynamically. I am very close to getting this to work. I have to this point successfully imported 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.
4
by: Anthony | last post by:
Hi Folks, I'm adding some columns to my datagrid which are of Combo Box type. I'm inheriting DataGridTextBoxColumn and doing all the usual stuff to get them populated. This is working fine. I...
10
by: JohnR | last post by:
I have a datatable as the datasource to a datagrid. The datagrid has a datagridtablestyle defined. I use the datagridtablestyle to change the order of the columns (so they can be different than...
4
by: Jeff | last post by:
I am stuck on trying to generate two columns headers for a datagrid on form load. I can use a datatable as the datasource and get the results I want, but I want to set different column widths and...
3
by: TPhelps | last post by:
I have a sample of an unbound (autogeneratecolumns is true) sortable/pagable datagrid that works. I want to change one of the columns to a hyperlink. The examples I find use a bound column. I...
10
by: Nick | last post by:
Hello, Please pardon my ignorance as I'm sure this is easy to do. I have a datagrid where I want to let the user delete columns. I added a context menu to the datagrid that has a delete option....
2
by: =?Utf-8?B?Y3JlYXZlczA2MjI=?= | last post by:
I have a nested datagrid in a xaml file, the parent datagrid loads the vendor information and the details loads the documents for that vendor in a datagrid. Everything is working fine until I click...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
1
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
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,...
0
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...
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 ...

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.