Home - Forums-.NET - FlyGrid.Net (Windows Forms) - virtual mode in nested grid

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

virtual mode in nested grid
Link Posted: 15-Dec-2005 03:34
i have two dataviews.
i want to make a master/detial grid in virtual mode, using those two dataviews as datasource for the grid (to be binded virtualy)

how can i do it?

thanks,
Guy.
Link Posted: 15-Dec-2005 04:18
See the Virtual Nested Grids sample of the FlyGrid.Net Demo.
Link Posted: 15-Dec-2005 04:30
in your example it is not binded with dataviews
Link Posted: 15-Dec-2005 04:53
Example shows how to fetch data in virtual mode and organize multilevel nested grids in virtual mode.
You can use the same technique to fetch data from dataviews if you use virtual mode.
If you want to bind dataviews to FlyGrid - see the Data Binding samples.
In this case you should organize dataset that will include both of these dataviews and create relationships between them (see the Data\NwindData.cs to know how to organize dataset with relationships).
Link Posted: 15-Dec-2005 04:59
i know how to use binded mode.
i'm intrested in the virtual mode.

i will try to convert your example to my needs

thank you.
Link Posted: 15-Dec-2005 06:10
See the FillNestedGridsGrid method in the Virtual Nested Grids sample - this is FlyGrid initilization method, and inspect event handlers that connected to FlyGrid.Net in this method to know how node data and chidren of parent node is fetched.
All you should do to convert this sample to your needs:
1. change columns initilization (you can use Preparecolumns from databoundGridForm.cs for these purposes)
2. change event handlers code to fetch data from dataview instead of data arrays used in this code as sources of data.
Link Posted: 17-Dec-2005 23:59
yes, i understand....

but the conversion itself is abit complicated...

you build a very specifiec string array to suit this example.
Link Posted: 18-Dec-2005 00:31
If you have two data view it is very easy to build virtual nested grid than Virtual Nested Grids examples shows:
First Scenario:
------------------------
1. add relations between dataviews to define parent and child dataview
2. Some node associated with some DataRow
3. Extract Datarow from ceratin node or find datarow by the index of node
4. Call DataRow.GetChildRows to receive collection of rows to build child nodes.

Second Scenario:
--------------
1. First dataview - parent, second - child
2. To get child rows from second dataview use DataView.FindRows
Link Posted: 03-Jan-2006 08:21
Guy25 - Did you have any luck with this.  I need to something very similar.  Wondering if it was as easy   as was suggested.

Thanks.
Link Posted: 05-Jan-2006 01:21
i got it working in a bit different way.
i can give you the code if you want.