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
;
}
}