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

[Solved] gridview not working as dropdowncontent of splitbutton

3 Answers 151 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Monika Kogler
Top achievements
Rank 1
Monika Kogler asked on 01 Dec 2010, 04:58 PM
hi,
i want to use a gridview as dropdowncontent of a splitbutton, but the functions of the grid are not working there. if grouping or filtering occurs, the application doesn't work any more and the webbrowser freezes. how can i add the gridview to the dropdowncontent to get this work? i have also tried wrapping a contextmenu around the grid but this didn't help either ...

thats my code:
<telerik:RadRibbonSplitButton x:Name="btnEditErrors" Text="Edit" Size="Large" telerik:ScreenTip.Title="Select an error" telerik:ScreenTip.Description="Select an error and assign it to an open task.">
                        <telerik:RadRibbonSplitButton.DropDownContent>
                            <!--<Controls:RadContextMenu BorderThickness="0" x:Name="radContextMenuError">-->
                                <Controls1:RadGridView x:Name="grid_errors" ItemsSource="{Binding}" SelectionMode="Single" MaxHeight="250" MaxWidth="400" SelectionChanged="GridErrors_SelectionChanged" AutoGenerateColumns="False" Margin="5" IsReadOnly="True">
                                    <Controls1:RadGridView.Columns>                                      
                                        <Controls1:GridViewDataColumn Header="Error" DataMemberBinding="{Binding Text}"></Controls1:GridViewDataColumn>
                                        <Controls1:GridViewDataColumn Header="Group" DataMemberBinding="{Binding ParentKeyName}"></Controls1:GridViewDataColumn>
                                    </Controls1:RadGridView.Columns>
                                </Controls1:RadGridView>
                            <!--</Controls:RadContextMenu>-->
                        </telerik:RadRibbonSplitButton.DropDownContent>
                    </telerik:RadRibbonSplitButton>

a second question: how can i close the dropdowncontent when a value in the grid is selected?
thx in advance

3 Answers, 1 is accepted

Sort by
0
Yordanka
Telerik team
answered on 02 Dec 2010, 11:37 AM
Hi Monika Kogler,

We tested your case and everything works fine on our side. Please, take a look at the attached project and let us know if we have missed something. 
About your second question, you can subscribe to the SelectionChanged event and to set the RibbonSplitButton IsOpen property to False.
 
Kind regards,
Yordanka
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Monika Kogler
Top achievements
Rank 1
answered on 02 Dec 2010, 02:40 PM
hi,
i wanted to test your example but an error occurs. the ribbon.dll is missing, therefore i used my local dll. when i run the application following error occurs: "The Property "TargetName" was not found in Type "SlideAnimation". [Line: 24 Position: 30]". Can you tell me what to do to run this demo?
thx in advance.

0
Yordanka
Telerik team
answered on 02 Dec 2010, 03:25 PM
Hello Monika Kogler,

I have updated the sample project. Let us know if you still have problems with running it.
 
Greetings,
Yordanka
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
GridView
Asked by
Monika Kogler
Top achievements
Rank 1
Answers by
Yordanka
Telerik team
Monika Kogler
Top achievements
Rank 1
Share this question
or