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

GridView selection display in Expander header while collapsed

4 Answers 151 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Madhan
Top achievements
Rank 1
Madhan asked on 29 Feb 2012, 06:29 AM
Hi,

We are using WPF RadGridview control inside the RadExpander. We like to know how to display the RadGridview's selected (only one) row  in the header section of the RadExpander while collpsing it.

Please refer the attached image for clear understanding of our need.

It would be great if you could provide us the sample project in WPF.

Thanks.

4 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 29 Feb 2012, 08:06 AM
Hi Madhan,

I am afraid that such functionality is not supported by RadGridView and you cannot leave only a single item visible. Nevertheless, you can try defining your own custom control that will be filled with the data from the selected item and display it in Expander 1 instead of RadGridView on selection. However, implementing such custom logic depends entirely on your requirements and the exact scenario that you want to achieve.

Greetings,
Maya
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Madhan
Top achievements
Rank 1
answered on 29 Feb 2012, 10:44 AM
Hi Maya,

Thanks for the reply.
Is there a way to add the telerik GridviewColumns from the Window for Usercontrol add (like below xaml code)? If so, please share with us. And also please have a look into the attached project.

<uc:ExpanderWithGridView>
            <uc:ExpanderWithGridView.Columns>
                <GridViewColumnCollection>
                    <telerik:GridViewDataColumn Header="Type" Width="*" IsReadOnly="True" />
                </GridViewColumnCollection>
            </uc:ExpanderWithGridView.Columns>
        </uc:ExpanderWithGridView>

Quick solution for this problem can be appreciated.

Thanks,
0
Madhan
Top achievements
Rank 1
answered on 29 Feb 2012, 01:47 PM
Hi Maya,

Any update or Solution for the problem mentioned above?

Thanks.
0
Maya
Telerik team
answered on 01 Mar 2012, 09:34 AM
Hi Madhan,

Based on the information provided, I get the impression that you want to find a column from one place (a window) and put it into another - user control. Am I right or am I missing something ?  If so, I am afraid that this is not possible.
Generally, you should not consider rows and columns as separate object that can be manipulated and moved from one place or another. They all are representation of the underlying data source and it is always recommended to work with the corresponding data items instead of the visual elements.
Considering the current issue, I would recommend you to work with the visibility of the columns. Please take a look at this blog post to verify whether such an approach could be helpful for your scenario. 

Kind regards,
Maya
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
GridView
Asked by
Madhan
Top achievements
Rank 1
Answers by
Maya
Telerik team
Madhan
Top achievements
Rank 1
Share this question
or