Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > C# windows form application
 

C# windows form application

1. how to invert the matrix grid. For example If I have 3 rows and 4 columns, I need 3 columns and 4 rows.

2. I want to add a new column in grid by clicking button. But always after 1st column new column should add not at rightmost.

Please I need help.
plaza202  Wednesday, July 29, 2009 6:40 PM
As far as I know, there is no way to do this automatically. You have to manually move each row's data and put it into each column with some for/each loops. Hope this helps.
www.insteptech.com ; msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
DeborahK  Wednesday, July 29, 2009 8:43 PM

In Current gridapplication has column count headings are there but I need text box to insert new heading to the column

plaza202  Wednesday, July 29, 2009 6:42 PM
So you have a grid, presumably a DataGridView? And you want to add a TextBox? Do you mean within the grid? Or somewhere else on the form?
www.insteptech.com ; msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
DeborahK  Wednesday, July 29, 2009 7:54 PM

Not sure exactly what you mean by #1. You populate the grid and on a button click or something you want all of the data in the columns swapped to the rows?

Regarding #2, dgv.Columns.Insert allows you to insert a column in any desired position.

Hope this helps.


www.insteptech.com ; msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
DeborahK  Wednesday, July 29, 2009 7:57 PM

I have images in grid and I want text box in grid above the image cell and I should be able toupdate that headingand save.

Thanks for the reply....

plaza202  Wednesday, July 29, 2009 8:29 PM
Thanks for the reply Deborahk.....

#1 we have 3*4 matrix (3 rows and 4 columns)... when I click button It should be chabged to 4*3 matrix (4 rows and 3 columns)
plaza202  Wednesday, July 29, 2009 8:32 PM
As far as I know, there is no way to do this automatically. You have to manually move each row's data and put it into each column with some for/each loops. Hope this helps.
www.insteptech.com ; msmvps.com/blogs/deborahk
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
DeborahK  Wednesday, July 29, 2009 8:43 PM

You can use google to search for other answers

Custom Search

More Threads

• I've a problem in reading the exact value of a checkboxcell in datagridview.
• Object Data Source Binding - Forms vs Web
• How to clear selection of DataGrid Rows Programatically............
• Data Source Configuration Wizard - Multi column primary key
• Mouse hover DataGridView
• Change ForeColor based on a value
• Using DataGridViewComboBoxColumn.DataSource in a databound DataGridView (with EF)
• Get one row from two rows in SQL query
• move focus from cell to usercontrol
• how can i create owner draw menues