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

How to get index of the current selected child view

3 Answers 179 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 21 May 2013, 04:44 PM
Ok I am sure this is simple, but cant seem to figure out how to get the index of the current child hierarchy view.

What I am trying to do is move the current view index to the begining of the collection so the export will export the data that the user is currently viewing. 

Thanks

3 Answers, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 24 May 2013, 01:47 PM
Hi Scott,

Thank you for writing.

You can see the currently active view of each row through the ActiveView property. Here is how to get the caption text of the currently active template for a given row:
string caption = row.ActiveView.ViewTemplate.Caption;

I hope this will be useful. Should you have further questions, I would be glad to help.

Regards,
Ivan Petrov
Telerik
RadChart for WinForms is obsolete. Now what?
0
Scott
Top achievements
Rank 1
answered on 24 May 2013, 02:46 PM
Ivan,

Thanks for the response.  I am not sure I phrased my question correctly.

I have a radGridview with 4 hierarchy views.  Since the excel exporter only does the first view (Index 0) how do I move the active view to index 0?

I am trying to do it like this:

radGridView1.MasterTemplate.Templates.Move("find index of current active view", 0);

radGridView1.MasterTemplate.CurrentView.Childrows - does not have an index property

Is there a way to change indexes by Caption Name?


0
Ivan Petrov
Telerik team
answered on 29 May 2013, 09:56 AM
Hello Scott,

Thank you for writing back.

You cannot rearrange the child views on row by row basis as they are defined on a grid level. However there should be a way to export child views other than the first one. I have added this as a feature request in our Public Issue Tracking System - PITS. You can track the progress of this feature, subscribe for status changes and add your vote/comment to it on the following link - PITS Feature. We will do our best to include this feature in our next release which is due at the middle of next month (June 2013).

I have also updated your Telerik Points for the good suggestion.

I hope this will help. Do not hesitate to write back with further questions.

Regards,
Ivan Petrov
Telerik
RadChart for WinForms is obsolete. Now what?
Tags
GridView
Asked by
Scott
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Scott
Top achievements
Rank 1
Share this question
or