Click here to Skip to main content
15,888,816 members
Please Sign up or sign in to vote.
4.25/5 (3 votes)
See more:
Is there a way to create a DataGridView using VB.Net that works like a datagridview but displays like a treegridview?
For example:

Items Amount

1x- Shirt 200.00
- Blue
- Cotton

2x+ Skirt 600.00
1x- Trouser 900.00
- Black

- Cotton

1x - 2pc Suit 200.00
- Navy

- wool

(Skirt has subcategories)

Any help would be greatly appreciated. Thanks
Posted
Comments
Sergey Alexandrovich Kryukov 21-May-13 14:23pm    
This is an interesting important question, my 5.
—SA
Menon Santosh 10-Sep-13 8:59am    
nice Question

1 solution

Good question! Such control would be very good to have, but at this moment I don't know any fully complete and ready-to-use solution which could satisfy me 100%. But the problem is solvable, just needs some extra work.

I tried out this CodeProject work: Virtual Mode TreeListView[^].

This is not a fully-fledged component yet; it's build up in ad-hoc way, but the general idea is good, so you could work it into a distinct universal control. The implementation shown in the article works, and can be generalized.

Also try out this one: http://blogs.msdn.com/b/markrideout/archive/2006/01/08/customizing-the-datagridview-to-support-expanding-collapsing-ala-treegridview.aspx[^].

—SA
 
Share this answer
 
v2
Comments
mabadeje 23-May-13 7:26am    
Hi sergey , thanks for the reply but the solution you proffered is in C#, so how can this be implemented in vb.net (sorry am new to programming)
Sergey Alexandrovich Kryukov 23-May-13 8:59am    
In exact same way as in C#. Or you can have some C# project, and reference by VB.NET project. On assembly will reference another one, and there is no barriers between them. You can even automatically translate the code. Please see my past answers:

http://www.codeproject.com/Answers/553339/FixedPageplustoplusContentPageplusconvertplusc-23p#answer1
http://www.codeproject.com/Answers/579583/Needplustoplusconvertplusvbpluscodeplustoplusc-23#answer3

—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900