This is a migrated thread and some comments may be shown as answers.

RadGridView DataLoadMode Async alternative

8 Answers 286 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Khoa
Top achievements
Rank 1
Khoa asked on 28 Jan 2019, 01:21 PM

Hello,

I'm using your RadGridView with the DataLoadMode on Async. What I've noticed is that the DataLoadMode cause the filters etc to be really unstable. However, the DataLoadMode on async makes the application really good, as it doesn't hang up the UI thread. But this won't work as long as it 

Right now I'm using the your RadGridView and search bar from the Outlook Template (found here: https://docs.telerik.com/devtools/winforms/visual-studio-integration/visual-studio-templates) . I'm working with large data sets, so upon search and loading of data, it freezes the UI Thread.  

I'm wondering how can I make the filtering and search etc to have the same async behavior as the dataloadmode async?

 

I also noticed that after using the search bar, the busyindicator for like data loading when I click on a button to show data e.g. etc stops working. 

8 Answers, 1 is accepted

Sort by
0
Khoa
Top achievements
Rank 1
answered on 28 Jan 2019, 02:38 PM
In addition, I'm using two gridviews -  grid1 populates the grid2 by adding a filter. The result is that grid2 will filter and only show the items associated with the selected item in grid1. I'm using QueryableCollection for both grids and filterdescriptors to add filter.
0
Khoa
Top achievements
Rank 1
answered on 28 Jan 2019, 02:52 PM
The bug I've found so far is that when I switch collection, the filter adds on the collection, but then disappear. This happen after the application has been used for several minutes.
0
Martin Ivanov
Telerik team
answered on 31 Jan 2019, 08:20 AM
Hello Khoa,

We don't recommend setting the DataLoadMode to Asynchronous. This could lead to issues as the ones you experience with the filtering. I will guess setting the mode to Synchronous will resolve the filtering issue you mentioned in your last reply. However, if it doesn't I would ask you to isolate it in a project and open a new support ticket from your telerik.com account.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Khoa
Top achievements
Rank 1
answered on 01 Feb 2019, 10:23 AM
Hi, I've disabled it. But how can I then use an async search, data loading and filtering ?
0
Martin Ivanov
Telerik team
answered on 06 Feb 2019, 07:16 AM
Hello Khoa Le,

To achieve an async data loading you can use a BackgroundWorker or a similar approach for loading the data on a background thread, and then assign it to the RadGridView control. Then you can use its IsBusy property to show a busy indicator while the data is loading. As for an async searching and filtering, I am afraid that the RadGridView control doesn't provide support for this.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Khoa
Top achievements
Rank 1
answered on 11 Feb 2019, 10:22 AM
Can you provide an example? Because whenever I try to remove, create new filterdescriptor and add to collection with backgroundworker, the application just freezes.
0
Khoa
Top achievements
Rank 1
answered on 11 Feb 2019, 11:47 AM
Like how can I achieve this for the search bar in the griview, which is provided in the outlook template for VS
0
Martin Ivanov
Telerik team
answered on 14 Feb 2019, 08:45 AM
Hello Khoa,

I attached a small example showing how to use the busy indication support. However, keep in mind that this is useful if you need to wait some time to generate or fetch your data (for example from a remote data service). However, the operations related to the RadGridView control, like setting its data source or filters cannot be created async or busy indicated. This is because of the nature of the WPF framework. Basically, everything related to the UI happens on a single thread. You can read some more about this in MSDN.

I could recommend to prepare a runnable example that shows your exact set up and the observed issues and then open a new support ticket from your telerik.com account. There you can attach the project and we can think if there is some specific optimizations to suggest.

Regards,
Martin Ivanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Khoa
Top achievements
Rank 1
Answers by
Khoa
Top achievements
Rank 1
Martin Ivanov
Telerik team
Share this question
or