|
I'd like to nest a datagrid view insidea column of another datagridview. Is this possible using the standard functionality exposed by Visual Basic 2008 Express?
If not, is anyone aware of any free third party control that implements this functionality? I know both infragistics and devexpress have such controls, but they're bundled with a load of other stuff that I don't need, and they don't come cheap.
I can nest html tablesand load them into my form using a webbrowser control, but that wouldn't serve my other purpose, which is, I want the users to be able to navigate through the rows one at a time using the up and down arrow keys (not between rows of the inner nested table, only between the outer table's rows),which is not possible using html tables. Anyone have any good ideas? | | reachrishikh Monday, February 02, 2009 7:41 PM | Allright, to anyone who is looking for a solution to this very problem, I have found an answer and am on the verge of breakthrough of achieving a nested datagridviewin this thread - http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/0a63a483-5b15-40d6-afb4-8add6b4f244f- Marked As Answer byreachrishikh Friday, March 06, 2009 9:28 AM
-
| | reachrishikh Friday, March 06, 2009 9:28 AM |
Hi reachrishikh,
Do you mean a master-details DataGridView? When you click a cell of a special, it will popup a DataGridView with the detail items related to the item in that cell?
If so, please look at this FAQ. http://windowsclient.net/blogs/faqs/archive/2006/07/10/how-do-i-show-master-details.aspx
If I misunderstood something, please feel free to tell me.
Sincerely, Kira Qian
Please mark the replies as answers if they help and unmark if they don't. | | Kira Qian Wednesday, February 04, 2009 7:49 AM | No, I don't mean that when you click aparticular cell, it will popup another datagridview with the detail items underneath it (like in MS Access)
The nested datagridview stays there all the time.
I'm trying to achieve this look, but with nested datagridviews. Please save the code as an html file and open it with your browser.
| <html> |
| <head> |
| <title>Test</title> |
| </head> |
| <body> |
| <tableborder="1"> |
| <colwidth="20"/> |
| <colwidth="50"/> |
| <colwidth="100"/> |
| <colwidth="400"/> |
| <ahref="page2.html"> |
| <trvalign="top"> |
| <td>01 |
| </td> |
| <td>Data1 |
| </td> |
| <td>Somedata1 |
| </td> |
| <td> |
| <tableborder="1"> |
| <colwidth="250"/> |
| <colwidth="75"/> |
| <colwidth="75"/> |
| <tr> |
| <td>Somemoredata1 |
| </td> |
| <td>Somefigures1 |
| </td> |
| <td> |
| </td> |
| </tr> |
| <tr> |
| <td>Somemoredata2 |
| </td> |
| <td> |
| </td> |
| <td>Somefigures2 |
| </td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </a> |
|
| <ahref="page3.html"> |
| <trvalign="top"> |
| <td>02 |
| </td> |
| <td>Data2 |
| </td> |
| <td>Somedata2 |
| </td> |
| <td> |
| <tableborder="1"> |
| <colwidth="250"/> |
| <colwidth="75"/> |
| <colwidth="75"/> |
| <tr> |
| <td>Somemoredata3 |
| </td> |
| <td>Somefigures3 |
| </td> |
| <td> |
| </td> |
| </tr> |
| <tr> |
| <td>Somemoredata4 |
| </td> |
| <td> |
| </td> |
| <td>Somefigures4 |
| </td> |
| </tr> |
| <tr> |
| <td>Somemoredata5 |
| </td> |
| <td> |
| </td> |
| <td>Somefigures5 |
| </td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </a> |
| <table> | | | reachrishikh Wednesday, February 04, 2009 10:40 AM |
Hi reachrishikh,
As far as I know DataGridView doesn't offer such kind of function. If you want to imitate it, you need to create a Borderless form and host a DataGridView in it. When you click the cell, popup that form with the detail information shown in the DataGridView hosted in that form.
Sincerely, Kira Qian
Please mark the replies as answers if they help and unmark if they don't. | | Kira Qian Thursday, February 05, 2009 2:21 AM | Thanks but popping up isn't an option for me. I have to show the entire data at one go. I'm trying to look into this other option suggested to me though. http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/0a63a483-5b15-40d6-afb4-8add6b4f244fAnyway, do you know how I can get the datagrid control to show up in my toolbox in Visual Basic 2008 Express? I've heard that you can nest datagrids inside datagrids, but as of now I can only create datagrids programmatically. I want to create one using the designer as well. | | reachrishikh Thursday, February 05, 2009 7:59 AM | I'm not sure if you're trying to use a webforms app or a windows app? but If you're trying for a winforms app, try getting hold of devExpress. It contains a datagrid control with which you can nest multiple grid views...
As for the web forms app, I have a sample at home on how to nest grid views. If that's what you're looking for I'll go thru the effort of finding it and posting it up here | | koenyn Monday, February 16, 2009 11:02 AM | Hi koenyn, Thanks for the help.
I'm using a windows app, not a webforms app. As I've already mentioned above, going the devExpress route would be too expensive for me. - Marked As Answer byreachrishikh Friday, March 06, 2009 9:26 AM
- Unmarked As Answer byreachrishikh Friday, March 06, 2009 9:26 AM
-
| | reachrishikh Monday, February 16, 2009 3:16 PM | Allright, to anyone who is looking for a solution to this very problem, I have found an answer and am on the verge of breakthrough of achieving a nested datagridviewin this thread - http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/0a63a483-5b15-40d6-afb4-8add6b4f244f- Marked As Answer byreachrishikh Friday, March 06, 2009 9:28 AM
-
| | reachrishikh Friday, March 06, 2009 9:28 AM |
|