<
telerik:RadTileView
DataContext
=
"{Binding Source={StaticResource DS}, PresentationTraceSources.TraceLevel=High}"
ItemsSource
=
"{Binding}"
x:Name
=
"mainTileView"
Height
=
"Auto"
Width
=
"Auto"
Margin
=
"0 0 7 0"
MaximizeMode
=
"One"
TileStateChangeTrigger
=
"SingleClick"
MinimizedColumnWidth
=
"180"
TileStateChanged
=
"TileView1_TileStateChanged"
>
<
telerik:RadTileView.ItemContainerStyle
>
<
Style
TargetType
=
"telerik:RadTileViewItem"
>
<
Setter
Property
=
"MinimizedHeight"
Value
=
"155"
/>
</
Style
>
</
telerik:RadTileView.ItemContainerStyle
>
<
telerik:RadTileView.ItemTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding UserLabel}"
/>
</
DataTemplate
>
</
telerik:RadTileView.ItemTemplate
>
<
telerik:RadTileView.ContentTemplate
>
<
DataTemplate
>
<
Grid
>
<
telerik:RadFluidContentControl
SmallToNormalThreshold
=
"190, 140"
NormalToSmallThreshold
=
"190, 140"
NormalToLargeThreshold
=
"320, 320"
LargeToNormalThreshold
=
"320, 320"
>
<
telerik:RadFluidContentControl.SmallContent
>
<
Grid
>
<
Border
Width
=
"193"
Height
=
"130"
RenderTransformOrigin
=
"0.248,-1.288"
>
<
StackPanel
>
<
TextBlock
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
FontSize
=
"12"
Text
=
"DS Storage System:"
/>
<
TextBlock
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
FontSize
=
"12"
Text
=
"{Binding UserLabel}"
/>
</
StackPanel
>
</
Border
>
</
Grid
>
</
telerik:RadFluidContentControl.SmallContent
>
<
telerik:RadFluidContentControl.Content
>
<
Grid
>
<
StackPanel
>
<
TextBlock
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
FontSize
=
"12"
Text
=
"Drawers"
/>
</
StackPanel
>
</
Grid
>
</
telerik:RadFluidContentControl.Content
>
<
telerik:RadFluidContentControl.LargeContent
>
<
telerik:RadTileView
x:Name
=
"drawerTileView"
ItemsSource
=
"{Binding Source={ StaticResource DrawersData}}"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
Margin
=
"0 0 7 0"
MaximizeMode
=
"One"
TileStateChangeTrigger
=
"SingleClick"
MinimizedColumnWidth
=
"180"
TileStateChanged
=
"TileView1_TileStateChanged"
>
<
telerik:RadTileView.ItemContainerStyle
>
<
Style
TargetType
=
"telerik:RadTileViewItem"
>
<
Setter
Property
=
"MinimizedHeight"
Value
=
"155"
/>
</
Style
>
</
telerik:RadTileView.ItemContainerStyle
>
<
telerik:RadTileView.ItemTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding DrawerNumber}"
/>
</
DataTemplate
>
</
telerik:RadTileView.ItemTemplate
>
<
telerik:RadTileView.ContentTemplate
>
<
DataTemplate
>
<
Grid
>
<
TextBlock
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
FontSize
=
"12"
Text
=
"Drives"
/>
<
telerik:RadGridView
x:Name
=
"gridDrives"
ItemsSource
=
"{Binding Source={ StaticResource DrivesData}}"
/>
</
Grid
>
</
DataTemplate
>
</
telerik:RadTileView.ContentTemplate
>
</
telerik:RadTileView
>
</
telerik:RadFluidContentControl.LargeContent
>
</
telerik:RadFluidContentControl
>
</
Grid
>
</
DataTemplate
>
</
telerik:RadTileView.ContentTemplate
>
</
telerik:RadTileView
>
Enter Name (Label box) |
Text Box |
Address |
Text Box |
Standard |
Combo Box |
Pin code |
Text Box |
Section |
Text Box |
State |
Combo Box |
Age |
Text Box |
Country |
Combo Box |
Enter Name (label box) |
Text Box |
Pin code |
Text Box |
Section |
Text Box |
State |
Combo Box |
Age |
Text Box |
Country |
Combo Box |
Address |
Text Box |
|
|
I'm using WPF RadGridView Q3-2010.
My purpose is to set the column template based on its data context while in edit mode. When not in edit mode the column will have triggers to customize the template.
I’m using CellEditTemplateSelector for switching templates according to the data context, but when I tried to enter triggers to the DataTemplate of the GridViewDataColumn.CellTemplate - I found that these triggers don’t work.
I read in this forum that in order to work with triggers on RadGridView, I need to set the ContentTemplate of the GridViewCell within the GridViewDataColumn.CellStyle attribute. After doing so, the triggers started to work, but the CellEditTemplateSelector Stopped working correctly. The Selector chooses the right template but the grid doesn’t use it, Moreover, the Data Context has been changed causing the grid to stop showing data after it enters the Edit Mode.
What do I need to do in order to make the triggers work with the edit template selector?
<
telerik:RadDropDownButton
Width
=
"180"
Name
=
"SourcesDropDown"
Content
=
"{Binding SelectedItem, ElementName=gridView}"
>
<
telerik:RadDropDownButton.ContentTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Name}"
/>
</
DataTemplate
>
</
telerik:RadDropDownButton.ContentTemplate
>
<
telerik:RadDropDownButton.DropDownContent
>
<
telerik:RadGridView
ShowGroupPanel
=
"False"
x:Name
=
"gridView"
AutoGenerateColumns
=
"False"
IsReadOnly
=
"True"
IsFilteringAllowed
=
"True"
ItemsSource
=
"{Binding Sources, Source={StaticResource References}}"
Width
=
"450"
Height
=
"150"
>
<
telerik:RadGridView.Columns
>...</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
</
telerik:RadDropDownButton.DropDownContent
>
</
telerik:RadDropDownButton
>