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

Using QueryableCollectionView

4 Answers 173 Views
GridView
This is a migrated thread and some comments may be shown as answers.
band
Top achievements
Rank 1
band asked on 18 Jul 2016, 03:11 PM

Hi,

I'm currently setting my ItemsSource for my RadGrid to be of type QueryableCollectionView

 

I also set the selecteditem to be of type IDTO. 

 

When I use an QueryableCollectionView, by default, SelectedItem is set to the first item in the collection. If I were to use an ObservableCollection, it's completely fine, SelectedItem is empty until an item is selected. May I ask how do I set it so the QueryableCollectionView doesn't set the value by default. 

 

4 Answers, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 21 Jul 2016, 12:09 PM
Hi,

Such requirement can be easily achieved by setting the IsSynchronizedWithCurrentItem property of RadGridView to False. Can you please give it a try?

In addition, you can review the CurrentItem vs SelectedItem topic.

All the best,
Stefan X1
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Simone
Top achievements
Rank 1
answered on 14 Sep 2019, 09:46 AM

Hi,

I'm also using QueryableCollectionView in RadGridView... During the clear (of all items) throw an exception 'Attempted to divide by zero.'

How I can resolve this issue?

In attached the stacktrace and my source code.

 

0
Vladimir Stoyanov
Telerik team
answered on 18 Sep 2019, 01:03 PM

Hello Simone,

Thank you for the provided pictures.

I tested the described scenario on my end, however I was not able to reproduce the exception. That is why I am attaching the sample project, which I used for testing purposes. May I ask you to check it out and see how it differs from the setup on your end?

Should you need any further assistance, can you modify the sample project in order to reproduce the exception and send it back in a new support ticket (since project files cannot be attached to forum posts)? If you find it more convenient, you can also send over a sample project of you own. Additionally, you can specify which version of the Telerik dlls you are using. This will hopefully allow me to reproduce the same behavior on my end and investigate it.

Thank you for advance for any help you can provide.

Regards,
Vladimir Stoyanov
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
Vladimir Stoyanov
Telerik team
answered on 18 Sep 2019, 01:22 PM
Hello Simone,

You can find the project attached to this reply.

Regards,
Vladimir Stoyanov
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
band
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Simone
Top achievements
Rank 1
Vladimir Stoyanov
Telerik team
Share this question
or