Link to home
Start Free TrialLog in
Avatar of MKItani
MKItani

asked on

Add Nodes to datagridview+C#

How i can add nodes to datagridview in c#.
Avatar of Gene_Cyp
Gene_Cyp

When you say nodes, you mean to

add a new row?
add a datagridview to an existing datagridview?
Avatar of MKItani

ASKER

what i means is add rows of types node that i can expand and collapse a set of rows

thank u gene cyp
i am waiting for your response.
Avatar of MKItani

ASKER

thank u Gene Cyp,

i used the first link and i have added this component to my project but the question is how i can use it,
i found this 3 steps:
3 simple steps
- Add the component to the designer or create it in runtime
- Set its DataGridView property to any existing databound DataGridView
-In runtime set the GroupOn property or call any of the SetGroupOn methods to start grouping

but i didn't understand please can u send me a clear instructions.
1) add the component:

If you install introduce that project into your project as a sub-project, when you update your overall project a new Control will be added to your Visual Studio that will have the name:  DataGridViewGrouper

Drag one such control into your form.

2)   Set its DataGridView property to any existing databound DataGridView

myDataGridViewGrouper  (or whatever name you gave it, just like you name a DataGridView)

Subro.Controls.DataGridViewGrouper myDataGridViewGrouper = new Subro.Controls.DataGridViewGrouper(dataGridView1);

3) myDataGridViewGrouper.SetGroupOn("NameOfThePropertyToGroupOn");

ASKER CERTIFIED SOLUTION
Avatar of Gene_Cyp
Gene_Cyp

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial