<
Window
x:Class
=
"Management.MainWindow"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
Title
=
"MainWindow"
Height
=
"768"
Width
=
"1366"
ResizeMode
=
"NoResize"
WindowStyle
=
"None"
>
<
Grid
Name
=
"MainGrid"
>
<
Grid.Resources
>
<
DataTemplate
x:Key
=
"GroupTemplate"
>
<
Border
BorderThickness
=
"1"
BorderBrush
=
"Black"
Margin
=
"5"
>
<
TextBlock
Text
=
"{Binding}"
Margin
=
"5,0,0,5"
FontWeight
=
"Bold"
/>
</
Border
>
</
DataTemplate
>
<
Style
TargetType
=
"telerik:Tile"
>
<
Setter
Property
=
"Margin"
Value
=
"5,15,0,0"
/>
</
Style
>
</
Grid.Resources
>
<
telerik:RadTileList
x:Name
=
"LayoutSetup"
GroupTemplate
=
"{StaticResource GroupTemplate}"
>
<
telerik:Tile
Group
=
"Continent"
Background
=
"Green"
TouchUp
=
"Tile_TouchUp"
>
<
TextBlock
Text
=
"Europe"
/>
</
telerik:Tile
>
<
telerik:Tile
Group
=
"Country"
Background
=
"Blue"
>
<
TextBlock
Text
=
"Germany"
/>
</
telerik:Tile
>
<
telerik:Tile
Group
=
"Continent"
Background
=
"Green"
>
<
TextBlock
Text
=
"Asia"
/>
</
telerik:Tile
>
<
telerik:Tile
Group
=
"Country"
Background
=
"Blue"
>
<
TextBlock
Text
=
"Italy"
/>
</
telerik:Tile
>
</
telerik:RadTileList
>
</
Grid
>
</
Window
>
Any approaches?
Hi,
My WPF GridView use background color for give some information to user:
- Green, row completed
- Orange, row to be process
- Yellow, row work in progress (WIP)
Actual color selection in grid is yellow. How I can change color selection?
Actualy, I use this RowStyle for change background color.
<controls:RadGridView.RowStyle>
<Style TargetType="gridView:GridViewRow">
<Setter Property="Background" Value="{Binding Color}"></Setter>
</Style>
</controls:RadGridView.RowStyle>
I try with Style.Trigger for IsMouseOver and IsSelected, but the rectangle of selection is always yellow.
I read in your forum that it’s possible override default style.
Can you send me an example in C#?
Consider the following scenario:
A grid populated with data, sorted and grouped by one column.
The row count is larger enough to enable scrollbars to be visible.
Data is added continuously to the grid. When added it is sorted in to the grouped list.
What we would like to achieve is that the current selected row(s) in the grid is “staying still” relative to the grid viewport when data is added to the grid.
We created a test project using Telerik WPF RadGridView, no specific settings in to the grid in XAML, and provided a mock datasource which added one row per second.
What happens is when data is added and sorted in “before” the selected row, the selected row is pushed down, out of the viewport.
Is it possible to have Telerik WPF RadGridView behave as mentioned above, the current visible rows stays put in the viewport even though rows are added above them in the grid?
<
CollectionViewSource
x:Key
=
"ManagerView"
>
<
CollectionViewSource.SortDescriptions
>
<
cm:SortDescription
Direction
=
"Ascending"
PropertyName
=
"Name"
/>
</
CollectionViewSource.SortDescriptions
>
</
CollectionViewSource
>
<
telerik:RadTreeView
x:Name
=
"ManagerTreeView"
Grid.Row
=
"1"
Grid.Column
=
"0"
ItemsSource
=
"{Binding Source={StaticResource ManagerView}}"
/>
CollectionViewSource cvs = this.TopLevelGrid.Resources["ManagerView"] as CollectionViewSource;
cvs.Source = RemoteWorkspace.Instance.RemoteManager;
Hi,
<telerik:RadGridView x:Name="radGridView" ShowGroupPanel="False" AutoGenerateColumns="False" ItemsSource="{Binding DataList}">
.....
</telerik:RadGridView>
ViewModel
----------
private ObservableCollection<ClientDataRealizationModel> _dataList
public ObservableCollection<ClientDataRealizationModel> DataList
{
get { return _dataList}
set { _dataList= value; OnPropertyChanged("DataList"); }
}
private void OnFilter(string year)
{
var list = _dataList.Where(x => x.Year == year).Select(x => x);
_dataList= new ObservableCollection<DataModel>(list);
}