Skip to content

Instantly share code, notes, and snippets.

@johnny4young
Created July 7, 2014 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnny4young/e7e2b0caba0e9809ed31 to your computer and use it in GitHub Desktop.
Save johnny4young/e7e2b0caba0e9809ed31 to your computer and use it in GitHub Desktop.
mostrar un radgridview como menú de un dropdown
<telerik:RadDropDownButton Content="Agencias" VerticalContentAlignment="Top">
<telerik:RadDropDownButton.DropDownContent>
<telerik:RadContextMenu BorderThickness="0" IconColumnWidth="0">
<telerik:RadGridView
CanUserInsertRows="False"
ItemsSource="{Binding DataContext.DocumentosAgencias,RelativeSource={RelativeSource AncestorType=telerik:RadDataForm}}"
GroupRenderMode="Flat" AutoGenerateColumns="False"
x:Name="dtgAgencias"
IsReadOnly="False"
ScrollViewer.VerticalScrollBarVisibility="Visible"
EnableColumnVirtualization="True"
EnableRowVirtualization="True"
SelectionMode="Multiple"
Height="250"
MinWidth="800"
MaxWidth="800"
IsScrolling="True"
>
<i:Interaction.Behaviors>
<behavior:RadGridViewSelectedItemsBehavior SelectedItems="{Binding DocumentosAgencias, Mode=TwoWay}" />
</i:Interaction.Behaviors>
<telerik:RadGridView.Columns>
<telerik:GridViewSelectColumn></telerik:GridViewSelectColumn>
<telerik:GridViewColumn Header="Agencia">
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding NombrePartial, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></TextBlock>
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
</telerik:RadContextMenu>
</telerik:RadDropDownButton.DropDownContent>
</telerik:RadDropDownButton>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment