This is a migrated thread and some comments may be shown as answers.

Load Childs on collapsing Row in RadGridView

3 Answers 71 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Flo
Top achievements
Rank 1
Flo asked on 26 Apr 2012, 01:27 PM
Hi

I'm new to the Telerik Libs.
I rewriting a program to use the Telerik Libs.

The Program should show the strucure of a CAD Structure as a "TreeListView". My Problem is that NOT the complete structure is loaded on startup. So it's only the first level loaded. The other data are laoded, when the tree is collapsed.

So I'm using the GridView as a SelfReference to have the Tree View.

The Problem is how can I show the "+" Icon even if I only loaded the first level. On loading the first level I know if there a sub Items or not.
I have tried it with Me.RadGridView1.Rows(rownum).HasChildRows = True but thats readonly.

And the next thing is, how can I react on collapsing the tree, and reload the sub items

Thanks
Br Flo

PS: I'm using VB.net ad VS2010

3 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 30 Apr 2012, 12:43 PM
Hi Florian,

The most suitable solution for your scenario is to use RadTreeView with load-on-demand data loading instead of the RadGridView control in self-reference mode. To control the visibility of the expander icon ('+')
depending on the existence of children items, you can set the LazyMode property to False.

I hope this helps.

All the best,
Julian Benkov
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
Flo
Top achievements
Rank 1
answered on 02 May 2012, 08:34 AM
Hi Julian

Thanks for your answer.
The Problem is that I need a lot of additional columns. So I wanted to use the GridView Control.
With the TreeView I don't' have the additional columns.

I'm thinking about a workaround.
Loading the first level. And where I need '+' I create a dummy entry.
When the user clicks on the '+', I delete the dummy entry and load the childs.

Which event do I have to use to react on the collapse?

Maybe you should think about the load-on-demand feature also for the DataView Control.
0
Julian Benkov
Telerik team
answered on 04 May 2012, 02:58 PM
Hello Florian,

You can use ChildViewExpanding or ChildViewExpanded events for this behavior.

I hope this helps. 
 
Greetings,
Julian Benkov
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
GridView
Asked by
Flo
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Flo
Top achievements
Rank 1
Share this question
or