473,387 Members | 1,553 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,387 software developers and data experts.

How can I get column numbers from a Winforms dataGrid

I have a dataGrid that is already populated with data. I added a
double click event so when I handle the double click event, I want to
get the total column numbers in that dataGrid. How can I do it?
Thanks in advance.

Jan 26 '07 #1
1 1138
On 26 Jan 2007 11:10:03 -0800, "sa******@yahoo.com" <sa******@gmail.comwrote:
>I have a dataGrid that is already populated with data. I added a
double click event so when I handle the double click event, I want to
get the total column numbers in that dataGrid. How can I do it?
Thanks in advance.
With the DataGridView.ColumnCount property?

There are lots of things like that in the documentation that comes with VS2K5.

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
Jan 27 '07 #2

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

Similar topics

0
by: Sergiu Cojocaru | last post by:
How can I immediately sort a bool column in a datagrid in winforms by clicking the column header? As I see after I check(uncheck) a row and then press the header to sort the column, the respective...
3
by: Tracey | last post by:
Hi, there. I was stuck on how to show a column of richtext in my datagrid on winform. I checked MSDN and found nothing helpful. Can someone tell me is it possible to do that ? Thanks!!
1
by: ElenaR | last post by:
I need to figure out how to name my column headers in a DataGrid. In VB6, I could write DataGrid1.Columns(0).Caption = "ID". What is the format for VB.NET? Thanks in Advance!
17
by: Mike Fellows | last post by:
im trying (unsucessfully) to add a checkbox column to my datagrid i basically have a datagrid that im populating from a dataset Me.DataGrid1.DataSource = ds.Tables(0) the datagrid then has 5...
3
by: paul | last post by:
Hi, I've a DataGrid and a DataSet (not a DataView) as the DataSource. Users can click on column headers and sort the contents of the DataGrid. I want to know how to determine which column is...
2
by: paaal | last post by:
hi! How can I create a combobox column in a datagrid? I downloaded an example where I copied a reference and added it to my own project. It worked out great, but it's only a trial of a...
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....
7
by: Rico | last post by:
Hello, I have a Datagrid with two rows, "Product Description" and "Serial Number". I want the user to be able to add / edit the serial number, but not the Product Description. In fact, I don't...
2
by: Sharon | last post by:
I want put into my DataGrid different control types in the same column. For example: Column 1, row 0 ==> TextBox Column 1, row 2 ==> CheckBox Column 1, row 2 ==> ComboBox etc... As I see, I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.