I have 8 RadGridViews in my wpf application. I have used some properties of the RadGridView in the below code snippet. Each RadGridView is added inside an Expander.
When I select an item in a tree view, I change the Datacontext of the Expander. But the rendering of the control takes too much of tne time. How do i improve the rendering performance of my RadGridViews? Am i missing anything? Can anyone help.
<Telerik:RadGridView CanUserFreezeColumns="False"
RowIndicatorVisibility="Collapsed"
RowDetailsVisibilityMode="{Binding ElementName=root,Path=CanEdit.IsEnabled,IsAsync=True,Converter={StaticResource rowdetailsvisibilityconverter}}"
RowDetailsTemplate="{StaticResource propertyEditTemplate}"
ItemsSource="{Binding Properties}"
AutoGenerateColumns="False"
SelectionUnit="FullRow"
SelectionMode="Single"
DataContext="{Binding DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Expander}}}"
Grid.Column="0"
Name="propertyListView"
VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.IsContainerVirtualizable="True">
<Telerik:RadGridView.ContextMenu>
<ContextMenu>
<MenuItem Header="Edit" Command="ApplicationCommands.Replace">
<MenuItem.Icon>
<Image Source="..\Images\Edit.png" Height="15" Width="20" Margin="0,0,2,0" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</Telerik:RadGridView.ContextMenu>
<Telerik:RadGridView.CommandBindings>
<CommandBinding Command="Replace" CanExecute="CommandBinding_NewTripAlarms" Executed="CommandBinding_EditProperties" />
</Telerik:RadGridView.CommandBindings>
<Telerik:RadGridView.InputBindings>
<KeyBinding Command="Replace" Key="Enter" />
</Telerik:RadGridView.InputBindings>
<Telerik:RadGridView.Columns>
<Telerik:GridViewDataColumn IsReadOnly="True" IsGroupable="False" IsFilterable="False" Header="{DynamicResource Name}" DataMemberBinding="{Binding Path=ModelProperty.PropertyName}" />
<Telerik:GridViewDataColumn IsReadOnly="True" Header="{DynamicResource DataType}" DataMemberBinding="{Binding Path=ModelProperty.DataType.Name}" />
<Telerik:GridViewDataColumn IsReadOnly="True" IsGroupable="False" IsSortable="False" IsFilterable="False" Header="{DynamicResource Value}" DataMemberBinding="{Binding Path=Value}" />
</Telerik:RadGridView.Columns>
</Telerik:RadGridView>
regards,
<
telerik:RadCartesianChart
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:DateTimeCategoricalAxis
Title
=
"Inspection Date"
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
LineThickness
=
"1"
Title
=
"Value"
>
</
telerik:LinearAxis
>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:RadCartesianChart.Series
>
<
telerik:ScatterPointSeries
ItemsSource
=
"{Binding Path=InspectionHistory}"
PointTemplate
=
"{StaticResource PointTemplate1}"
XValueBinding
=
"InspectionDate"
YValueBinding
=
"Value"
/>
<
telerik:ScatterPointSeries
ItemsSource
=
"{Binding Path=InspectionHistory}"
PointTemplate
=
"{StaticResource PointTemplate2}"
XValueBinding
=
"InspectionDate"
YValueBinding
=
"MinimalValue"
>
</
telerik:ScatterPointSeries
>
</
telerik:RadCartesianChart.Series
>
<
telerik:RadCartesianChart.Grid
>
<
telerik:CartesianChartGrid
MajorLinesVisibility
=
"XY"
/>
</
telerik:RadCartesianChart.Grid
>
</
telerik:RadCartesianChart
>
Hi,
Currently we are dealing with a Problem of a blocking UI-Thread during the Initial dataload of our RadGridView.
Instead of the blocking UI-Thread we would expect the "running" BusyIndicator!
(During different Grid-Opertions (like Paging, Sorting,...) the BusyIndicator is displayed correctly).
We are using Entity-Framework and since we are having a really complex query-logic we are working with IQueryable Sources.
We have tried to set the data through Dependency-Property-Binding and also tried it manually.
As we found in the web the IQueryable-Source should be the best solution for large amount of data - isn't it?
Here are our attempts:
1) Using an IQueryable Dependency-Property
public static readonly DependencyProperty QueryableSourceProperty =
DependencyProperty.Register("QueryableSource", typeof(IQueryable<Data.TransactionHistory>), typeof(MainWindow), new PropertyMetadata(default(IQueryable<Data.SalesOrderDetail>)));
..
// different conditions... for examp
qeryableSource = queryableSource.OrderBy(o => o.TransactionType);
..
ItemsSource="{Binding QueryableSource, ElementName=window}"
2) Setting the ItemsSource-Property of the grid manuelly to our IQueryable
this.radGridElement.ItemsSource = queryableSource;
3) Run all operations asynchronous with Task and Dispatcher
new Task(() => { this.loadData2(); }).Start();
...
Dispatcher.BeginInvoke(new Action(() => { this.QueryableSource = queryableSource; }));
...
All these samples didn't work as expected.
What's the best solution to bind the Grid on an IQueryable source, so that everything works asynchronously and the BusyIndicator is displayed during the loading-time???
Hopefully you can provide us with a solution...
I can provide you a sample .net application if you send me an upload-link...
Best regards
Jürgen
List<NamedPermissionRangeStart> allPermissionRangeStarts = Document.EnumerateChildrenOfType<NamedPermissionRangeStart>().SkipWhile(a => a.Type !=
"Text"
).ToList();
NamedPermissionRangeStart cur = (NamedPermissionRangeStart)Document.CaretPosition.GetCurrentSpanBox().AssociatedSpan.PreviousSibling;
for
(
int
i = 0; i < allPermissionRangeStarts.Count; i++)
{
if
(allPermissionRangeStarts[i].InternalKey == cur.InternalKey)
{
Document.CaretPosition.MoveToPosition(((Span)allPermissionRangeStarts[i + 1].NextSibling).?????)
break
;
}
}