Dear support representative,
issue is that my RadGridView aggregation functions seems too slow.
I have RadGridView bound with IQueryable collection and it has sum aggregation function enabled for 4 columns.
RadGridView has also paging enabled, is set to normally load 100 rows per page.
In SQL table there are about 120 thousand rows and it takes about 2 sec. to calculate sum on a float type column.
In RadGridView it is about 8 sec. to load initial page with aggregation and 1 sec. if aggregation is not used.
Note that PersistableRadGridView is derived form RadGridView just to have couple more properties related to saving settings.
Any leads?
Currently working on binding aggregation values to VM's property so I would not need to use the sum.
<
controls:PersistableRadGridView
x:Name
=
"RadGridView"
Style
=
"{StaticResource RadGridViewWithFilters}"
DockPanel.Dock
=
"Top"
DataLoadMode
=
"Asynchronous"
FrozenColumnCount
=
"{Binding FrozenColumns}"
behaviours:RadGridViewColumnsBinding.ColumnsCollection
=
"{Binding Columns}"
behaviours:DoubleClickBehavior.Command
=
"{Binding ShowDetailsViewCommand}"
behaviours:RadGridViewFilterBehavior.Filters
=
"{Binding ColumnFilterDescriptors}"
behaviours:RadGridViewSortDescriptorsBinding.SortDescriptorsCollection
=
"{Binding ColumnSortDescriptors}"
ShouldCloseFilteringPopupOnKeyboardFocusChanged
=
"True"
SelectionMode
=
"Extended"
IsSynchronizedWithCurrentItem
=
"False"
IsReadOnly
=
"True"
Key
=
"{Binding PersistanceKey}"
RememberFilters
=
"{Binding RememberFilters, Mode=TwoWay}"
IsRememberFilterDisabled
=
"{Binding DisableRememberFilters, Mode=TwoWay}"
ItemsSource
=
"{Binding QueryableData}"
ShowColumnFooters
=
"True"
>
<
telerik:StyleManager.Theme
>
<
telerik:Windows8Theme
/>
</
telerik:StyleManager.Theme
>
<
telerik:RadGridView.Resources
>
<
Style
TargetType
=
"{x:Type telerik:GridViewCell}"
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
>
<
ContentPresenter
x:Name
=
"PART_ContentPresenter"
Margin
=
"{TemplateBinding Control.Padding}"
Content
=
"{TemplateBinding ContentControl.Content}"
ContentTemplate
=
"{TemplateBinding ContentControl.ContentTemplate}"
VerticalAlignment
=
"{TemplateBinding Control.VerticalContentAlignment}"
HorizontalAlignment
=
"{TemplateBinding Control.HorizontalContentAlignment}"
/>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
</
telerik:RadGridView.Resources
>
<
i:Interaction.Behaviors
>
<
behaviours:MultiSelectBehavior
SelectedItems
=
"{Binding SelectedEntries, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
/>
<
behaviours:RadGridViewRememberFiltersBehavior
/>
</
i:Interaction.Behaviors
>
</
controls:PersistableRadGridView
>
Hi,
I'm working with Piechart and I have an issue with the labels when I have many slices (please see the attached picture). The labels overlaps and even with changing the PieChartLabelsDisplayMode it would not help much. Is there any way to fix this issue?
Best regards,
Houssem
I have a RadDiagramToolbox and I populate it in my viewmodel in an ObservableCollection. I have added a transform to one of the shapes already in the FlowChartShapeType of a 90 degree rotation. Now it appears properly in the toolbox however when I drag it into the diagram it keeps the shape but I lose the rotation. I have followed some examples on deserializing and have added what I have in the code behind on the diagram view. Why doesn't it deserialize properly since Transform is part of Geometry.
ViewModel:
this.Items = new ObservableCollection<MyShape>();
var fe_geometry = ShapeFactory.GetShapeGeometry(FlowChartShapeType.ManualOperationShape).Clone();
fe_geometry.Transform = new RotateTransform(90);
Items .Shapes.Add(new MyShape
{
Name = $"FE{i}",
Geometry = fe_geometry,
});
}
----------------------------
relevant xaml
View:
<telerik:RadDiagramToolbox x:Name="toolbox"
Title="Modules"
Header="{Binding SelectedItem.Header, RelativeSource={RelativeSource Self}}"
ItemsSource="{Binding Items}"
ItemTemplate="{StaticResource ToolboxGroupTemplate}"
Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=toolboxButton}" />
<telerik:RadDiagram Grid.Row="1" x:Name="diagram" ConnectionBridge="Bow"
RouteConnections="True" IsRotationEnabled="False"
ScrollViewer.VerticalScrollBarVisibility="Auto"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
IsEditable="False"
IsResizingEnabled="False" ShapeDeserialized="diagram_ShapeDeserialized" ShapeDoubleClicked="diagram_ShapeDoubleClicked" >
code behind:
public MainWindow()
{
InitializeComponent();
//this is when you drag it creates the right shape
//http://docs.telerik.com/devtools/wpf/controls/raddiagram/howto/drag-custom-toolboxitem
SerializationService.Default.ItemSerializing += Default_ItemSerializing;
}
private void Default_ItemSerializing(object sender, SerializationEventArgs<IDiagramItem> e)
{
if (e.Entity is RadDiagramShape)
{
e.SerializationInfo["Geometry"] = (e.Entity as RadDiagramShape).Geometry.ToString(CultureInfo.InvariantCulture);
XmlSerializer serializer = new XmlSerializer(typeof(IModule));
using (var writer = new StringWriter())
{
serializer.Serialize(writer, ((e.Entity as RadDiagramShape).DataContext as MyShape).Module);
e.SerializationInfo["DataContent2"] = writer.ToString();
}
}
}
private void diagram_ShapeDeserialized(object sender, Telerik.Windows.Controls.Diagrams.ShapeSerializationRoutedEventArgs e)
{
if (e.Shape as RadDiagramShape != null)
{
(e.Shape as RadDiagramShape).Geometry = GeometryParser.GetGeometry(e.SerializationInfo["Geometry"].ToString()).Clone();
var test = e.SerializationInfo["DataContent2"].ToString();
XmlSerializer serializer = new XmlSerializer(typeof(IModule));
using (var reader = new StringReader(test))
{
(e.Shape as RadDiagramShape).DataContext = serializer.Deserialize(reader);
}
}
}
Thanks,
Amiel
<
tc:RadTreeView
x:Name
=
"tree"
ItemsSource
=
"{Binding CategoryCollectionView, UpdateSourceTrigger=PropertyChanged}"
SelectionChanged
=
"RadTreeView_SelectionChanged"
LoadOnDemand
=
"tree_LoadOnDemand"
IsVirtualizing
=
"True"
tc:TreeViewPanel.VirtualizationMode
=
"Standard"
ta:AnimationManager.IsAnimationEnabled
=
"False"
IsDragTooltipEnabled
=
"False"
IsDragDropEnabled
=
"True"
SelectionMode
=
"Multiple"
>
<
tc:RadTreeView.Resources
>
<
Style
TargetType
=
"{x:Type ScrollBar}"
/>
<
HierarchicalDataTemplate
DataType
=
"{x:Type local:CategoryTreeItemViewModel}"
ItemsSource
=
"{Binding ChildrenCollectionView}"
>
<!--snip-->
</
HierarchicalDataTemplate
>
<
DataTemplate
DataType
=
"{x:Type local:EventNodeViewModel}"
>
<!-- snip -->
</
DataTemplate
>
</
tc:RadTreeView.Resources
>
<
tc:RadTreeView.ItemContainerStyle
>
<
Style
TargetType
=
"{x:Type tc:RadTreeViewItem}"
>
<
Setter
Property
=
"IsExpanded"
Value
=
"{Binding IsExpanded, Mode=TwoWay}"
/>
<
Setter
Property
=
"IsSelected"
Value
=
"{Binding IsSelected, Mode=TwoWay}"
/>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding DataContext.IsMainCategoryTree, ElementName=tree}"
Value
=
"True"
>
<
Setter
Property
=
"IsLoadOnDemandEnabled"
Value
=
"{Binding LoadOnDemand}"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
</
tc:RadTreeView.ItemContainerStyle
>
</
tc:RadTreeView
>
I am creating a ViewModel for a Window with a kendo Wizzard control on it. The ViewModel is getting very big because I 5 pages in my wizzard. Is there a way to bind a ViewModel to a page.
Sorry I am new to WPF and MVVM.
Basically I have something like this.
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:ui="clr-namespace:SMS.Installer.UI"
x:Class="SMS.Installer.UI.MainWindow"
mc:Ignorable="d"
Icon="Resources/favicon.ico"
Title="SMS Installer"
WindowStartupLocation="CenterScreen">
<Window.DataContext>
<ui:MainWindowViewModel/>
</Window.DataContext>
<Grid>
<DockPanel>
<telerik:RadWizard x:Name="MainWindowWizard" >
<!-- Introduction form -->
<telerik:WelcomeWizardPage Name="IntroductionPage" SideHeaderWidth="120">
<!-- some page controls removed -->
</telerik:WelcomeWizardPage>
<!-- License agreement -->
<telerik:WizardPage Name="LicenseAgreementPage" SideHeaderWidth="120" AllowNext="{Binding CanLicenseAgreementPageNext}">
<!-- !!!!!! WANT TO PUT BINDING HERE !!!!!! -->
<!-- some page controls removed-->
</telerik:WizardPage>
<!-- License key -->
<telerik:WizardPage Name="LicenseKeyPage" SideHeaderWidth="120" AllowNext="{Binding CanLicenseKeyPageNext}">
<!-- some page controls removed-->
</telerik:WizardPage>
<!-- database -->
<telerik:WizardPage Name="DatabasePage" SideHeaderWidth="120" AllowNext="{Binding CanDatabasePageNext}">
<!-- some page controls removed-->
</telerik:WizardPage>
<!-- installation -->
<telerik:CompletionWizardPage Name="InstallationPage" SideHeaderWidth="120" AllowHelp="False">
<!-- some page controls removed-->
</telerik:CompletionWizardPage>
</telerik:RadWizard>
</DockPanel>
</Grid>
</Window>
Hi,
Sometimes the bars are extremely thin for some sparse datasets. When I display a bar chart with a DateTimeContinuousAxis horizontal axis, spanning just a few hours with only 2 or 3 items, the bars are extremely thin. If I change the timespan to a day, also with just a few items, the bars look normal (see attached screenshots). I'm using UI for WPF Q2 2016, Is this s bug?
Thanks,
Brian
I am sure this was working but I am not seeing the correct output now:
Row Data Context Property
[Display(Name =
"Start Date"
)]
[DisplayFormat(DataFormatString =
"{0:d}"
)]
public
DateTime ClaimDate {
get
;
set
; }
XAML in the View
<
telerik:RadGridView
VerticalAlignment
=
"Stretch"
CanUserDeleteRows
=
"False"
CanUserFreezeColumns
=
"False"
CanUserInsertRows
=
"False"
CanUserReorderColumns
=
"False"
CanUserSearch
=
"False"
ShowGroupPanel
=
"False"
ShowSearchPanel
=
"False"
ItemsSource
=
"{Binding Data.ItemsSource}"
BorderBrush
=
"Transparent"
IsReadOnly
=
"True"
ShowToolTipOnTrimmedText
=
"True"
RowIndicatorVisibility
=
"Collapsed"
SelectionMode
=
"Single"
IsFilteringAllowed
=
"False"
AlternationCount
=
"2"
>
</
telerik:RadGridView
>
C# Interactive Window
> DateTime.Today.ToString(
"d"
)
"05/09/2017"
Screenshots are attached.
Any ideas?
Thanks,
Maurice