How to get index of the current selected child view

4 posts, 0 answers
  1. Scott
    Scott avatar
    16 posts
    Member since:
    Sep 2012

    Posted 21 May 2013 Link to this post

    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
  2. Ivan Petrov
    Admin
    Ivan Petrov avatar
    717 posts

    Posted 24 May 2013 Link to this post

    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?
  3. Scott
    Scott avatar
    16 posts
    Member since:
    Sep 2012

    Posted 24 May 2013 Link to this post

    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?


  4. Ivan Petrov
    Admin
    Ivan Petrov avatar
    717 posts

    Posted 29 May 2013 Link to this post

    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?
Back to Top