This grid uses a group header template and the collapse all/ expand all functionality is in code using ExpandAllGroups() and CollapseAllGroups(). Is this a known issue? (I am having trouble duplicating this on my machine but I have seen it happen on other machines)
Here is xaml for the grid:
<
telerik:RadGridView
DockPanel.Dock
=
"Top"
x:Name
=
"grdAccrual"
ItemsSource
=
"{Binding EnterpriseAllocationRecords}"
AutoGenerateColumns
=
"False"
IsFilteringAllowed
=
"False"
ShowGroupPanel
=
"False"
SelectionMode
=
"Extended"
ShowInsertRow
=
"False"
ActionOnLostFocus
=
"CommitEdit"
CanUserInsertRows
=
"False"
CanUserDeleteRows
=
"False"
CanUserReorderColumns
=
"False"
IsReadOnly
=
"False"
CanUserFreezeColumns
=
"False"
CanUserResizeColumns
=
"False"
CanUserSortColumns
=
"False"
RowIndicatorVisibility
=
"Collapsed"
AutoExpandGroups
=
"True"
EditTriggers
=
"F2,CellClick"
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
RowEditEnded
=
"grdAccrual_RowEditEnded"
RowHeight
=
"27"
>
<
telerik:RadGridView.Columns
>
<!--<
telerik:GridViewDataColumn
Header
=
"ATIG"
CellStyle
=
"{StaticResource LeftAlignCell}"
DataMemberBinding
=
"{Binding TransactionCode}"
Width
=
"65"
IsReadOnly
=
"True"
></
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"Description"
CellStyle
=
"{StaticResource LeftAlignCell}"
DataMemberBinding
=
"{Binding TransactionDescription}"
IsReadOnly
=
"True"
Width
=
"*"
/>-->
<
telerik:GridViewDataColumn
Header
=
"Ent"
CellStyle
=
"{StaticResource LeftAlignCell}"
DataMemberBinding
=
"{Binding EnterpriseCode}"
IsFilterable
=
"False"
IsReadOnly
=
"True"
Width
=
"50"
/>
<
telerik:GridViewDataColumn
Header
=
"Ent Desc"
CellStyle
=
"{StaticResource LeftAlignCell}"
DataMemberBinding
=
"{Binding EnterpriseDescription}"
IsFilterable
=
"False"
IsReadOnly
=
"True"
Width
=
"350"
/>
<
telerik:GridViewDataColumn
Header
=
"Cash/Inv"
DataMemberBinding
=
"{Binding SuggestedAccrualAmount}"
DataFormatString
=
"{}{0:f2}"
IsFilterable
=
"False"
IsReadOnly
=
"True"
Width
=
"70"
>
<!--<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"Cash/Inv Accrual"
TextWrapping
=
"Wrap"
/>
</
telerik:GridViewDataColumn.Header
>-->
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"%"
DataMemberBinding
=
"{Binding AllocationPercent}"
DataFormatString
=
"{}{0:p2}"
IsFilterable
=
"False"
Width
=
"60"
>
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtAllocationPercent"
Mask
=
"p3.2"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"AllocationPercent"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKASHelper:PercentValidationRule
Min
=
"-100.00"
Max
=
"100.00"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"Units"
DataMemberBinding
=
"{Binding Units}"
DataFormatString
=
"{}{0:f2}"
IsFilterable
=
"False"
IsReadOnly
=
"True"
Width
=
"70"
></
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"Weight"
DataMemberBinding
=
"{Binding Weight}"
DataFormatString
=
"{}{0:f2}"
IsFilterable
=
"False"
IsReadOnly
=
"True"
Width
=
"70"
></
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Amount}"
DataFormatString
=
"{}{0:f2}"
IsFilterable
=
"False"
Width
=
"70"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"Amount"
TextWrapping
=
"Wrap"
/>
</
telerik:GridViewDataColumn.Header
>
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtAmount"
Mask
=
"#11.2"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"Amount"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKASHelper:DoubleValidationRule
Min
=
"-10000000000.00"
Max
=
"10000000000.00"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
</
telerik:GridViewDataColumn
>
</
telerik:RadGridView.Columns
>
<
telerik:RadGridView.GroupRowStyle
>
<
Style
TargetType
=
"telerik:GridViewGroupRow"
>
<
Setter
Property
=
"ShowHeaderAggregates"
Value
=
"False"
></
Setter
>
</
Style
>
</
telerik:RadGridView.GroupRowStyle
>
<
telerik:RadGridView.GroupHeaderTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
Margin
=
"0,0"
Height
=
"45"
>
<
TextBlock
Text
=
"{Binding Group.Key}"
Margin
=
"0,0,0,2"
Width
=
"200"
/>
<
telerik:AggregateResultsList
ItemsSource
=
"{Binding AggregateResults}"
VerticalAlignment
=
"Center"
>
<
ItemsControl.ItemTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Vertical"
VerticalAlignment
=
"Center"
>
<
TextBlock
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
Text
=
"{Binding Caption}"
Width
=
"90"
/>
<
TextBlock
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
Text
=
"{Binding FormattedValue}"
Width
=
"90"
Style
=
"{StaticResource EnterpriseStatusStyle}"
/>
</
StackPanel
>
</
DataTemplate
>
</
ItemsControl.ItemTemplate
>
<
ItemsControl.ItemsPanel
>
<
ItemsPanelTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
/>
</
ItemsPanelTemplate
>
</
ItemsControl.ItemsPanel
>
</
telerik:AggregateResultsList
>
</
StackPanel
>
</
DataTemplate
>
</
telerik:RadGridView.GroupHeaderTemplate
>
<
telerik:RadGridView.GroupDescriptors
>
<
telerik:GroupDescriptor
x:Name
=
"TransactionGroup"
Member
=
"TransactionGroup"
SortDirection
=
"Ascending"
>
<
telerik:GroupDescriptor.AggregateFunctions
>
<
telerik:MinFunction
Caption
=
"Cash"
SourceField
=
"CashTotal"
ResultFormatString
=
"{}{0:0.00}"
/>
<
telerik:MinFunction
Caption
=
"Beg Inv"
SourceField
=
"BegInvTotal"
ResultFormatString
=
"{}{0:0.00}"
/>
<
telerik:MinFunction
Caption
=
"End Inv"
SourceField
=
"EndInvTotal"
ResultFormatString
=
"{}{0:0.00}"
/>
<
telerik:MinFunction
Caption
=
"Beg Acc"
SourceField
=
"BegAccruedTotal"
ResultFormatString
=
"{}{0:0.00}"
/>
<
telerik:MinFunction
Caption
=
"End Acc"
SourceField
=
"EndAccruedTotal"
ResultFormatString
=
"{}{0:0.00}"
/>
<
telerik:MinFunction
Caption
=
"Accrual"
SourceField
=
"AccrualAmount"
ResultFormatString
=
"{}{0:c2}"
/>
<
telerik:SumFunction
Caption
=
"Ent Amt"
SourceField
=
"Amount"
ResultFormatString
=
"{}{0:c2}"
/>
<
local:EnterpriseDifferenceFunction
Caption
=
"Diff"
ResultFormatString
=
"{}{0:0.00}"
/>
</
telerik:GroupDescriptor.AggregateFunctions
>
</
telerik:GroupDescriptor
>
</
telerik:RadGridView.GroupDescriptors
>
</
telerik:RadGridView
>
19 Answers, 1 is accepted
I used the code snippet you provide in order to reproduce the issue but I was not able to. I'm attaching my test project for a reference. Can you modify it in order to demonstrate the issue?
Kind regards,
Yordanka
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
The problem may come from the applied CellStyle and from this one - Style="{StaticResource EnterpriseStatusStyle}". In my test project I removed them because of missing resources. Can you modify the test project applying these styles and check whether the issue will appear?
Also, what is the version of the Telerik controls you are using?
Greetings,
Yordanka
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
The grid is in a user control within a tab control if that helps.
Here is the style from the UserControl Resources:
<
Style
x:Key
=
"EnterpriseStatusStyle"
TargetType
=
"TextBlock"
>
<
Setter
Property
=
"Foreground"
Value
=
"{StaticResource LabelFontColor}"
/>
<
Setter
Property
=
"FontWeight"
Value
=
"Normal"
/>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding Caption}"
Value
=
"Accrual"
>
<
Setter
Property
=
"FontWeight"
Value
=
"Bold"
/>
</
DataTrigger
>
<
DataTrigger
Value
=
"Equal"
>
<
DataTrigger.Binding
>
<
MultiBinding
Converter
=
"{StaticResource EnterpriseStatusConverter}"
>
<
Binding
Path
=
"Caption"
/>
<
Binding
Path
=
"Value"
/>
</
MultiBinding
>
</
DataTrigger.Binding
>
<
Setter
Property
=
"Foreground"
Value
=
"{StaticResource GoodFontColor}"
/>
</
DataTrigger
>
<
DataTrigger
Value
=
"GreaterThan"
>
<
DataTrigger.Binding
>
<
MultiBinding
Converter
=
"{StaticResource EnterpriseStatusConverter}"
>
<
Binding
Path
=
"Caption"
/>
<
Binding
Path
=
"Value"
/>
</
MultiBinding
>
</
DataTrigger.Binding
>
<
Setter
Property
=
"Foreground"
Value
=
"{StaticResource WarningFontColor}"
/>
</
DataTrigger
>
<
DataTrigger
Value
=
"LessThan"
>
<
DataTrigger.Binding
>
<
MultiBinding
Converter
=
"{StaticResource EnterpriseStatusConverter}"
>
<
Binding
Path
=
"Caption"
/>
<
Binding
Path
=
"Value"
/>
</
MultiBinding
>
</
DataTrigger.Binding
>
<
Setter
Property
=
"Foreground"
Value
=
"{StaticResource ErrorFontColor}"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
Can you update the attached test project to use this style? Still, there are missing resources and I cannot reproduce the problem.
In order to attach the project you need to open a support ticket.
Regards,
Yordanka
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
I included screen shots below.
Here is the xaml.
<
UserControl
x:Class
=
"AccrualView"
mc:Ignorable
=
"d"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:telerikGrid
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
xmlns:telerikNavigation
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
xmlns:telerikControls
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
xmlns:telerikInput
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
xmlns:telerikMaskedInput
=
"clr-namespace:Telerik.Windows.Controls.MaskedInput;assembly=Telerik.Windows.Controls.Input"
xmlns:imKASHelper
=
"clr-namespace:KMAR105.KAS.Controls;assembly=KASHelper"
xmlns:local
=
"clr-namespace:KMAR105_Analysis_System"
xmlns:sys
=
"clr-namespace:System;assembly=mscorlib"
KeyboardNavigation.TabNavigation
=
"Local"
FocusManager.FocusedElement
=
"{imKASHelper:FirstFocusedElement}"
>
<
UserControl.Resources
>
<
imKASHelper:EnterpriseStatusConverter
x:Key
=
"EnterpriseStatusConverter"
/>
<
sys:Double
x:Key
=
"LabelWidth"
>90</
sys:Double
>
<
local:CommandReference
x:Key
=
"ExpandAllCommandReference"
Command
=
"{Binding ExpandAllCommand}"
/>
<
local:CommandReference
x:Key
=
"CollapseAllCommandReference"
Command
=
"{Binding CollapseAllCommand}"
/>
<!--<
local:CommandReference
x:Key
=
"ExpandCurrentCommandReference"
Command
=
"{Binding ExpandCurrentCommand}"
/>
<
local:CommandReference
x:Key
=
"CollapseCurrentCommandReference"
Command
=
"{Binding CollapseCurrentCommand}"
/>-->
<!--<
Style
x:Key
=
"GridViewGroupRowHideAggregates"
TargetType
=
"telerik:GridViewGroupRow"
>
<
Setter
Property
=
"ShowHeaderAggregates"
Value
=
"False"
/>
</
Style
>-->
<!--<
Style
x:Key
=
"EnterpriseStatusStyle"
TargetType
=
"TextBlock"
>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding EntStatus}"
Value
=
"Good"
>
<
Setter
Property
=
"Foreground"
Value
=
"{StaticResource GoodFontColor}"
/>
</
DataTrigger
>
<
DataTrigger
Binding
=
"{Binding EntStatus}"
Value
=
"Warning"
>
<
Setter
Property
=
"Foreground"
Value
=
"{StaticResource WarningFontColor}"
/>
</
DataTrigger
>
<
DataTrigger
Binding
=
"{Binding EntStatus}"
Value
=
"Error"
>
<
Setter
Property
=
"Foreground"
Value
=
"{StaticResource ErrorFontColor}"
/>
</
DataTrigger
>
<
DataTrigger
Binding
=
"{Binding EntStatus}"
Value
=
"None"
>
<
Setter
Property
=
"Foreground"
Value
=
"{StaticResource TransparentFontColor}"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>-->
<
Style
x:Key
=
"EnterpriseStatusStyle"
TargetType
=
"TextBlock"
>
<
Setter
Property
=
"Foreground"
Value
=
"{StaticResource LabelFontColor}"
/>
<
Setter
Property
=
"FontWeight"
Value
=
"Normal"
/>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding Caption}"
Value
=
"Accrual"
>
<
Setter
Property
=
"FontWeight"
Value
=
"Bold"
/>
</
DataTrigger
>
<
DataTrigger
Value
=
"Equal"
>
<
DataTrigger.Binding
>
<
MultiBinding
Converter
=
"{StaticResource EnterpriseStatusConverter}"
>
<
Binding
Path
=
"Caption"
/>
<
Binding
Path
=
"Value"
/>
</
MultiBinding
>
</
DataTrigger.Binding
>
<
Setter
Property
=
"Foreground"
Value
=
"{StaticResource GoodFontColor}"
/>
</
DataTrigger
>
<
DataTrigger
Value
=
"GreaterThan"
>
<
DataTrigger.Binding
>
<
MultiBinding
Converter
=
"{StaticResource EnterpriseStatusConverter}"
>
<
Binding
Path
=
"Caption"
/>
<
Binding
Path
=
"Value"
/>
</
MultiBinding
>
</
DataTrigger.Binding
>
<
Setter
Property
=
"Foreground"
Value
=
"{StaticResource WarningFontColor}"
/>
</
DataTrigger
>
<
DataTrigger
Value
=
"LessThan"
>
<
DataTrigger.Binding
>
<
MultiBinding
Converter
=
"{StaticResource EnterpriseStatusConverter}"
>
<
Binding
Path
=
"Caption"
/>
<
Binding
Path
=
"Value"
/>
</
MultiBinding
>
</
DataTrigger.Binding
>
<
Setter
Property
=
"Foreground"
Value
=
"{StaticResource ErrorFontColor}"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
</
UserControl.Resources
>
<
UserControl.InputBindings
>
<
KeyBinding
Key
=
"E"
Modifiers
=
"Alt"
Command
=
"{StaticResource ExpandAllCommandReference}"
CommandParameter
=
"You invoked the command with Alt + e"
/>
<
KeyBinding
Key
=
"L"
Modifiers
=
"Alt"
Command
=
"{StaticResource CollapseAllCommandReference}"
CommandParameter
=
"You invoked the command with Alt + l"
/>
<!--<
KeyBinding
Key
=
"E"
Modifiers
=
"Control"
Command
=
"{StaticResource ExpandCurrentCommandReference}"
CommandParameter
=
"You invoked the command with Ctrl + e"
/>
<
KeyBinding
Key
=
"L"
Modifiers
=
"Control"
Command
=
"{StaticResource CollapseCurrentCommandReference}"
CommandParameter
=
"You invoked the command with Ctrl + l"
/>-->
</
UserControl.InputBindings
>
<
DockPanel
LastChildFill
=
"True"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
>
<
StackPanel
DockPanel.Dock
=
"Top"
Margin
=
"10,10,10,10"
Height
=
"23"
Orientation
=
"Horizontal"
HorizontalAlignment
=
"Right"
>
<
telerik:RadButton
Margin
=
"0,0,0,0"
Width
=
"100"
x:Name
=
"btnExpand"
IsTabStop
=
"False"
Content
=
"Expand All"
ToolTip
=
"Expand All (Alt+E)"
Command
=
"{StaticResource ExpandAllCommandReference}"
/>
<
telerik:RadButton
Margin
=
"0,0,0,0"
Width
=
"100"
x:Name
=
"btnCollapse"
IsTabStop
=
"False"
Content
=
"Collapse All"
ToolTip
=
"Collapse All (Alt+L)"
Command
=
"{StaticResource CollapseAllCommandReference}"
/>
</
StackPanel
>
<
telerik:RadGridView
DockPanel.Dock
=
"Top"
x:Name
=
"grdAccrual"
ItemsSource
=
"{Binding EnterpriseAllocationRecords}"
AutoGenerateColumns
=
"False"
IsFilteringAllowed
=
"False"
ShowGroupPanel
=
"False"
SelectionMode
=
"Extended"
ShowInsertRow
=
"False"
ActionOnLostFocus
=
"CommitEdit"
CanUserInsertRows
=
"False"
CanUserDeleteRows
=
"False"
CanUserReorderColumns
=
"False"
IsReadOnly
=
"False"
CanUserFreezeColumns
=
"False"
CanUserResizeColumns
=
"False"
CanUserSortColumns
=
"False"
RowIndicatorVisibility
=
"Collapsed"
AutoExpandGroups
=
"True"
EditTriggers
=
"F2,CellClick"
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
RowEditEnded
=
"grdAccrual_RowEditEnded"
RowHeight
=
"27"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Ent"
CellStyle
=
"{StaticResource LeftAlignCell}"
DataMemberBinding
=
"{Binding EnterpriseCode}"
IsFilterable
=
"False"
IsReadOnly
=
"True"
Width
=
"50"
/>
<
telerik:GridViewDataColumn
Header
=
"Ent Desc"
CellStyle
=
"{StaticResource LeftAlignCell}"
DataMemberBinding
=
"{Binding EnterpriseDescription}"
IsFilterable
=
"False"
IsReadOnly
=
"True"
Width
=
"350"
/>
<
telerik:GridViewDataColumn
Header
=
"CashTot"
DataMemberBinding
=
"{Binding CashTotal}"
DataFormatString
=
"{}{0:f2}"
IsFilterable
=
"False"
IsReadOnly
=
"True"
Width
=
"70"
/>
<
telerik:GridViewDataColumn
Header
=
"Cash/Inv"
DataMemberBinding
=
"{Binding SuggestedAccrualAmount}"
DataFormatString
=
"{}{0:f2}"
IsFilterable
=
"False"
IsReadOnly
=
"True"
Width
=
"70"
/>
<
telerik:GridViewDataColumn
Header
=
"%"
DataMemberBinding
=
"{Binding AllocationPercent}"
DataFormatString
=
"{}{0:p2}"
IsFilterable
=
"False"
Width
=
"60"
>
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtAllocationPercent"
Mask
=
"p3.2"
AcceptsReturn
=
"False"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
telerikMaskedInput:MaskedInputExtensions.Minimum
=
"-2147483648"
telerikMaskedInput:MaskedInputExtensions.Maximum
=
"2147483648"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"AllocationPercent"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKASHelper:PercentValidationRule
Min
=
"-100.00"
Max
=
"100.00"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"Units"
DataMemberBinding
=
"{Binding Units}"
DataFormatString
=
"{}{0:f2}"
IsFilterable
=
"False"
IsReadOnly
=
"True"
Width
=
"70"
></
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"Weight"
DataMemberBinding
=
"{Binding Weight}"
DataFormatString
=
"{}{0:f2}"
IsFilterable
=
"False"
IsReadOnly
=
"True"
Width
=
"70"
></
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Amount}"
DataFormatString
=
"{}{0:f2}"
IsFilterable
=
"False"
Width
=
"105"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"Amount"
TextWrapping
=
"Wrap"
/>
</
telerik:GridViewDataColumn.Header
>
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtAmount"
Mask
=
"#11.2"
AcceptsReturn
=
"False"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
telerikMaskedInput:MaskedInputExtensions.Minimum
=
"-2147483648"
telerikMaskedInput:MaskedInputExtensions.Maximum
=
"2147483648"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"Amount"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKASHelper:DoubleValidationRule
Min
=
"-10000000000.00"
Max
=
"10000000000.00"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
</
telerik:GridViewDataColumn
>
</
telerik:RadGridView.Columns
>
<
telerik:RadGridView.GroupRowStyle
>
<
Style
TargetType
=
"telerik:GridViewGroupRow"
>
<
Setter
Property
=
"ShowHeaderAggregates"
Value
=
"True"
></
Setter
>
</
Style
>
</
telerik:RadGridView.GroupRowStyle
>
<
telerik:RadGridView.GroupHeaderTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
Margin
=
"0,0"
Height
=
"45"
>
<
TextBlock
Text
=
"{Binding Group.Key}"
Margin
=
"0,0,0,2"
Width
=
"200"
/>
<
telerik:AggregateResultsList
ItemsSource
=
"{Binding AggregateResults}"
VerticalAlignment
=
"Center"
>
<
telerik:AggregateResultsList.ItemsPanel
>
<
ItemsPanelTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
/>
</
ItemsPanelTemplate
>
</
telerik:AggregateResultsList.ItemsPanel
>
<
telerik:AggregateResultsList.ItemTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Vertical"
VerticalAlignment
=
"Center"
>
<
TextBlock
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
Text
=
"{Binding Caption}"
Width
=
"90"
/>
<
TextBlock
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
Text
=
"{Binding FormattedValue}"
Width
=
"90"
/>
<!--<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding FormattedValue}" Width="90" Style="{StaticResource EnterpriseStatusStyle}" />-->
</
StackPanel
>
</
DataTemplate
>
</
telerik:AggregateResultsList.ItemTemplate
>
</
telerik:AggregateResultsList
>
</
StackPanel
>
</
DataTemplate
>
</
telerik:RadGridView.GroupHeaderTemplate
>
<
telerik:RadGridView.GroupDescriptors
>
<
telerik:GroupDescriptor
x:Name
=
"TransactionGroupDescriptor"
Member
=
"TransactionGroup"
SortDirection
=
"Ascending"
>
<
telerik:GroupDescriptor.AggregateFunctions
>
<
telerik:MinFunction
Caption
=
"Cash"
SourceField
=
"CashTotal"
ResultFormatString
=
"{}{0:0.00}"
/>
<!--<
telerik:MinFunction
Caption
=
"Beg Inv"
SourceField
=
"BegInvTotal"
ResultFormatString
=
"{}{0:0.00}"
/>
<
telerik:MinFunction
Caption
=
"End Inv"
SourceField
=
"EndInvTotal"
ResultFormatString
=
"{}{0:0.00}"
/>
<
telerik:MinFunction
Caption
=
"Beg Acc"
SourceField
=
"BegAccruedTotal"
ResultFormatString
=
"{}{0:0.00}"
/>
<
telerik:MinFunction
Caption
=
"End Acc"
SourceField
=
"EndAccruedTotal"
ResultFormatString
=
"{}{0:0.00}"
/>
<
telerik:MinFunction
Caption
=
"Accrual"
SourceField
=
"AccrualAmount"
ResultFormatString
=
"{}{0:c2}"
/>
<
telerik:SumFunction
Caption
=
"Ent Amt"
SourceField
=
"Amount"
ResultFormatString
=
"{}{0:c2}"
/>
<
local:EnterpriseDifferenceFunction
Caption
=
"Diff"
ResultFormatString
=
"{}{0:0.00}"
/>-->
</
telerik:GroupDescriptor.AggregateFunctions
>
</
telerik:GroupDescriptor
>
</
telerik:RadGridView.GroupDescriptors
>
</
telerik:RadGridView
>
</
DockPanel
>
</
UserControl
>
Thank you for the details.
I was able to reproduce the problem and logged it as a bug. We will investigate it further in order to provide a solution.
I've updated your Telerik points.
Kind regards,
Yordanka
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
We debugged the problem and it was related to the applied GroupHeaderTemplate. We managed to resolve it and the fix for it is part of our just released Q3 2012 binaries. The only thing you should set is RadGridView.GroupRenderMode="Flat". It is a new mode which improves significantly the performance in grouped scenario. I am attaching a sample project for a reference. Please give it a try and let me know in case of any problems.
Greetings,
Yordanka
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
<
telerik:RadGridView.GroupRowStyle
>
<
Style
TargetType
=
"telerik:GridViewGroupRow"
>
<
Setter
Property
=
"ShowHeaderAggregates"
Value
=
"False"
></
Setter
>
</
Style
>
</
telerik:RadGridView.GroupRowStyle
>
Do I need to set a different style to turn off the unwanted totals?
thank you!!!!
When the GroupRenderMode is set to Flat you should apply implicit style that targets GroupHeaderRow instead of GridViewGroupRow:
<
Style
TargetType
=
"telerik:GroupHeaderRow"
>
<
Setter
Property
=
"ShowHeaderAggregates"
Value
=
"False"
/>
</
Style
>
Let me know if you have additional questions.
Regards,
Yordanka
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
However, a user did notice a problem with edit mode when the records are grouped this way (haven't seen it in other gridviews). If you click or F2 to go into Edit mode and then hit enter to move down, it seems to go out of edit mode randomly. You can move down a few rows without a problem (even across groups) and then it just switches to view mode when you hit enter so the focus is correct but you have to click to get back in to edit mode. It may be related to scrolling because it seems to happen when I get close to the bottom of my screen. Is this a known issue?
Could you test with our latest internal build which will be available for download later today? Let me know in case the problem still occurs.
All the best,
Yordanka
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
You can get into edit mode for a field and hit enter and it will commit and move to the next record correctly until it gets close to the bottom of the screen. In that case, it commits and then goes into view mode on the next record. To continue editing, the user has to click with the mouse or hit F2 again.
thanks!
I've tried to reproduce the problem with grouped grid but to no avail. Could you check the attached test project?
Regards,
Yordanka
Telerik
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
thanks! Sorry this is taking so long to debug.
In the GridView EditTemplates Demo, I did the following:
1. Dragged Name into the Group Panel
2. Using the mouse, I clicked once in the name column just to get focus and selected row on the first record.
3. Used the down arrow key to navigate down the grid. You will see in the picture that my focus moved over the header record but the selected record is one behind. It doesn't happen every time but I was able to duplicate the problem at least three times.
In my application when I arrow down (or move down after edit), the focus goes down but not the selection. This means that my record goes out of Edit mode and the user has to select the field again with the mouse or F2 to start editing again. On my screen, it almost looks like the scroll isn't going all the way down. If I use the right arrow, it moves the focus right and shifts up a tiny bit and then selects the record like it should.
Any ideas?
thanks!
Thank you for the details.
The problem is known for us and it is logged in our tracking system. I will raise its priority in order to be investigated as soon as possible.
Regards,
Yordanka
Telerik
DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.
I am afraid that we do not have any workarounds for this issue yet. You can track its progress in our Feedback Portal: Focus and selection desynchronize when navigating through the keyboard down key. You can also follow the feedback item. That way you will be notified each time the status of the item gets changed.
Best Regards,
Stefan
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.