Hi,
I'im trying to create a row style for a specific need.
I was starting from a sample found on this forum called "custom row layout"
What i want is to be able to use the search panel and then show highlight.
here is the xaml code :
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
x:Class="_42060_CustomRowLayout.MainWindow"
x:Name="Window"
Title="MainWindow"
Width="640" Height="480">
<Window.Resources>
<Style x:Key="MyCustomRowStyle" TargetType="{x:Type telerik:GridViewRow}">
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:GridViewRow}">
<Border x:Name="rowsContainer" Background="#FF525252" Padding="8,8,8,0">
<Border Background="Transparent" x:Name="selectedRow"
BorderThickness="1" BorderBrush="#FF000000">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Text="Code:"
Grid.Column="0" Grid.Row="0"
VerticalAlignment="Top" HorizontalAlignment="Left"
Foreground="White" FontWeight="Bold" Margin="0,15,15,0" />
<telerik:HighlightTextBlock Text="{Binding CD}"
Grid.Column="1" Grid.Row="0"
VerticalAlignment="Top" HorizontalAlignment="Left"
Foreground="White" Margin="0,15,15,0" />
<TextBlock Text="Description:"
Grid.Column="0" Grid.Row="1"
VerticalAlignment="Top" HorizontalAlignment="Left"
Foreground="White" FontWeight="Bold" Margin="0,15,15,0" />
<TextBlock Text="{Binding DESC}"
Grid.Column="1" Grid.Row="1"
VerticalAlignment="Top" HorizontalAlignment="Left"
Foreground="White" Margin="0,15,15,0" />
<TextBlock Text="Enabled:"
Grid.Column="0" Grid.Row="2"
VerticalAlignment="Top" HorizontalAlignment="Left"
Foreground="White" FontWeight="Bold" Margin="0,15,15,0" />
<TextBlock Text="{Binding ENABLED}"
Grid.Column="1" Grid.Row="2"
VerticalAlignment="Top" HorizontalAlignment="Left"
Foreground="White" Margin="0,15,15,0" />
</Grid>
</Border>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Background" Value="White"/>
<Setter Property="BorderBrush" Value="#FFCBCBCB"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
</Style>
</Window.Resources>
<Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource SampleDataSource}}">
<telerik:RadGridView Margin="293,8,8,8" AutoGenerateColumns="False" RowStyle="{DynamicResource MyCustomRowStyle}" DataContext="{Binding SelectedItems, ElementName=radGridView}" ItemsSource="{Binding}" ShowSearchPanel="True"/>
<telerik:RadGridView x:Name="radGridView" HorizontalAlignment="Left" Margin="0,8" ItemsSource="{Binding Collection}" Width="289" AutoGenerateColumns="False" ShowSearchPanel="True">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding Artist}"/>
<telerik:GridViewDataColumn DataMemberBinding="{Binding Year}"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
</Grid>
</Window>
could you help me ?
regards,
Alex
Hallo,
I have the following situation:
- GridView with GridViewSelectColumn
- GridView ItemsSource bound with VirtualQueryableCollectionView
- GridViewRow is not always selectable (via IsEnabled), depending on the bound object
<Style TargetType="telerik:GridViewRow" BasedOn="{StaticResource GridViewRowStyle}">
<Setter Property="IsEnabled" Value="{Binding IsSelectable, Mode=OneWay}" />
</Style>
SelectAll is working properly, but only for the visual items.
Good: When triggering SelectAll, the visible GridViewRows which have IsEnabled = false, are not selected.
Bad: When triggering SelectAll, the not yet visualized GridViewRows will be selected once I scroll down in the list, thus ignoring the IsEnabled property on the gridviewrow.
Is there a way to fix this or am I missing something?
Thanks for your response!
Best regards,
Ben
I have an issue in the gridview with the rowdetails.
I'm using the grid to show hierarchical data but at a certain point the rowdetails stop expanding although i have still have a gridview left with no data in it.
Why is this happening and how can i solve this so i expands and activates the scrollbars when i reaches the bottom of the grid?
I am trying to display the values used for the RadHeatMap as labels in the table but somehow I cannot get it to work. The version of Telerik which is used is 2015.3.930.45 (which is 2015 Q3 so it should include the new labeling functionality which was introduced in 2015 Q2).
I have looked at the relevant example in the demo application (version R2 2017) but that code does not work in 2015 Q3).
What could be the issue here? Thanks in advance!
Hi,
it's possible to show the group line on bottom of details instead of before details?
The effect is similar to a pivor grid, but I want to make the same effect in the gridview
Telerik Support,
Just wanted to give a heads-up, was having an interesting problem with a client where our app wouldn't start up, eventually learned it was because Telerik.Windows.Documents.Core.dll was identified as a trojan by their Comodo One client and quarantined. Attached is a report of us adding the file to the exclusion list.
Thanks,
Kyle
Hi,
I am trying to create a view where I have a RadMenu that drives the content being displayed in a RadGridView. So when I make a selection in my RadMenu the RadGridView will populate based on a parameter passed from the Menu.
I cannot find any examples of this anywhere on this forum. Can you please point me in the right direction?
Regards
David
I am using a PropertyGrid. The grid itself uses a converter to select the proper control to display based on type as such:
<
UserControl.Resources
>
<
converters:PropertyGridDataTemplateSelector
x:Key
=
"dataTemplateSelector"
>
<
converters:PropertyGridDataTemplateSelector.NumericPropertyDataTemplate
>
<
DataTemplate
>
<
telerik:RadNumericUpDown
propertyGrid:AutoBindBehavior.UpdateBindingOnElementLoaded
=
"Value"
/>
</
DataTemplate
>
</
converters:PropertyGridDataTemplateSelector.NumericPropertyDataTemplate
>
<
converters:PropertyGridDataTemplateSelector.IntegerPropertyDataTemplate
>
<
DataTemplate
>
<
telerik:RadNumericUpDown
propertyGrid:AutoBindBehavior.UpdateBindingOnElementLoaded
=
"Value"
NumberDecimalDigits
=
"0"
/>
</
DataTemplate
>
</
converters:PropertyGridDataTemplateSelector.IntegerPropertyDataTemplate
>
</
converters:PropertyGridDataTemplateSelector
>
</
UserControl.Resources
>
I then assign the EditorTemplateSelector of the RadPropertyGrid
<telerik:RadPropertyGrid
EditorTemplateSelector="{StaticResource dataTemplateSelector}">
There are other properties set as well such rendermode flat, data context, etc... but the above is how I am hooking to my converter for the property grid.
The primary property grid works great. I have a couple of ObservableCollection<myObject> that allow for a drop down and those show a CollectionEditor. This also works great with two exceptions:
#1 - I have no ability to assign a control to a property because the converter being used is not carried over into the CollectionEditor. So for example I have a Rate on the object contained in the ObservableCollection.
The value $25.10 shows up as "25.1".
What I would like is to be able to assign to that property the RadNumericUpDown like the properties in the primary property grid and then just say "NumberDecimalDigits="2" like I can do with the converter.
However I cannot see a way to do this.
I found an article on Editor Attributes that you can use on the model, but our Data Model that contains our models is not allowed to reference View-Specific control assemblies. The other attributes you can decorate properties with (like Browsable, Description, etc...) work fine because they are part of the .NET Framework and we have access, but the Editor Attributes you all provide cannot be accessed from the Data Model.
Is there a way to edit the CollectionEditor within a RadPropertyGrid to know to use certain controls like you can do with converters on a RadPropertyGrid itself? Is there another way to accomplish what I am after?