Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Having problems nesting a datagridview....is it even possible.. I am complete newbiew to winforms as I have always devloped in asp.net
 

Having problems nesting a datagridview....is it even possible.. I am complete newbiew to winforms as I have always devloped in asp.net

Hi All,

I am building my first meaningful app and am stuck onnesting dartagridview I think I am having problems understanding the differences between developing with asp.net and winform.


I have included a screen shot of my asp.net prototype.. http://www.lizard-design.com/screen.gifmight help me explain.

Basically I have a grid (the example shows the first 3 rows).. inthe second row downI have highlighted the whole row in green and then inside that highlighted 2 appears in blue these are nested gridview, I have no idea how to achieve this in winform I think I am so stuck in my ways with asp.net I just am doing it the wrong way.. in asp.net I would just go into html drop another grid inside the parent grid and bind the inner grids on the rowdatabound (or similar).. so my questions is this..

can i put a gridview inside another gridview in winforms if so can anyone point me in the right direction, maybe an article or something

my second problem is can i drag objects into a row in the gridview.. i have marked in purple hopefully showing the functionality in my asp.net app...can I do this in winforms.. after it is dropped i save the relationship between the dragged object and the row

Thanksin advance, any help would be appreciated.
Aaron Springthorpe  Friday, June 19, 2009 4:00 PM
I think it will be exceptionally difficult to do this in WinForms with the existing controls. And no, you cannot easily embed a DataGridView inside a DataGridView.

Have you looked at WPF? It is the new library for Windows forms development and it is MUCH closer to ASP.NET.

The WPF forum is here:

http://social.msdn.microsoft.com/forums/en-US/wpf/threads/

And a "getting started" page is here:

http://windowsclient.net/default.aspx

Hope this helps.
www.insteptech.com
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
DeborahK  Friday, June 19, 2009 4:14 PM
I think it will be exceptionally difficult to do this in WinForms with the existing controls. And no, you cannot easily embed a DataGridView inside a DataGridView.

Have you looked at WPF? It is the new library for Windows forms development and it is MUCH closer to ASP.NET.

The WPF forum is here:

http://social.msdn.microsoft.com/forums/en-US/wpf/threads/

And a "getting started" page is here:

http://windowsclient.net/default.aspx

Hope this helps.
www.insteptech.com
We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!
DeborahK  Friday, June 19, 2009 4:14 PM

You can use google to search for other answers

Custom Search

More Threads

• ComboBox slow to populate
• Updating read-only columns in bound GridView
• Changing properties to a form over another form
• How Do I Display a "Name" Using a "NameID" in a DatagridTextboxColumn
• TextBox binding and format
• datagridview cellvaluechanged event
• How to get image into table
• Copy Selected To New Datatable
• DataGridView hierarchical
• How can i display sorted data in combobox of combocolumn of datagrid