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

No QueryableDataServiceCollectionView?

8 Answers 80 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Casimodo
Top achievements
Rank 1
Casimodo asked on 03 May 2015, 03:16 PM

Hi,

I'm trying to bind the RadDataGrid to OData (v4) via the generated OData service client.

I learned that there is Telerik's QueryableDataServiceCollectionView for WPF, but I can't find it for universal Windows apps - at least VS does not find it.

Is QueryableDataServiceCollectionView missing here?

If it's missing, what is the currently supported way of binding to a queryable data service?

 

I'm using "Telerik UI For Windows 8.1" version "2015.1.420.45".

 

Best regards,

Kasimier Buchcik

8 Answers, 1 is accepted

Sort by
0
Ivaylo Gergov
Telerik team
answered on 06 May 2015, 07:48 AM
Hi,

Thank you for contacting us.

The UI for Windows Universal does not provide a DataServiceDataSource control so the QueryableDataServiceCollectionView is not supported. Although this component is in our future plans we cannot provide a specific time frame for its availability.
Currently you should translate the query result to a collection of strongly typed or dynamic objects and handle the synchronization by yourself.

Please, let me know should you have any other questions or suggestions.

Regards,
Ivaylo Gergov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Casimodo
Top achievements
Rank 1
answered on 08 May 2015, 05:24 PM

Hi Ivaylo,

Ok. So let's try an other way. I looked at the RadDataGrid. It has sort and filter descriptors.

Is it possible disable the grid's own sort and filtering? I would like to attach to the descriptors and query my service myself when the descriptors change.

Regards,

Kasimier Buchcik

0
Casimodo
Top achievements
Rank 1
answered on 09 May 2015, 12:30 AM

It seems the RadDataGrid for universal apps does not want to be provided with data ;-) All the necessary hooks are declared internal.

The only thing I came up with is attaching to the sort and filter descriptors to a SimpleODataSource. But this is quite ugly, because the grid additionally still tries to filter on its own. Additionally, when using the "StartsWith", etc. filters, OData returns case-insensitive filter results and the grid applies case-sensitive filters afterwards.

I've attached the relevant files of my experiment to make the grid operate on a Microsoft.OData.Client.DataServiceContext (note that I added the ".jpg" extension to the zip as it is one of your "allowed extensions").

Issues:

1) How to make the grid use case-insensitive filters?

2) How to convince the grid to just use what it has been given via the ItemsSource and not to sort and filter on its own?

Regards,

Kasimier Buchcik

0
Casimodo
Top achievements
Rank 1
answered on 09 May 2015, 01:15 AM

On (1): Partially solved by explicitely setting TextFilterDescriptor.IsCaseSensitive to false on the FilterDescriptors.CollectionChanged event.

if (e.NewItems != null)
                foreach (var item in e.NewItems.OfType<TextFilterDescriptor>())
                    item.IsCaseSensitive = false;

TODO: Need to remove the the toggle-button for sensitive/non-sensitive filtering in the UI.

0
Ivaylo Gergov
Telerik team
answered on 13 May 2015, 01:06 PM
Hello,

The only way to hide the IsCaseSensitive toggle button would be to change the template of the DataGridTextFilterControl â€‹which you can get from our source code.
Also, currently it is not possible to use the FIltering UI of the RadDataGrid without applying our built-in filtering. However, I think this is a valid scenario and for Q2 2015 we will have an alternative for it. Probably we will add a Command that will execute when the Filter and Clear Filter buttons are tapped. Then you can choose not to execute the default implementation but filter your data on the server.

Please, let me know if this helps.

Regards,
Ivaylo Gergov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Casimodo
Top achievements
Rank 1
answered on 15 May 2015, 04:14 PM

Hi Ivaylo,

I abandoned the grid for universal apps for now. Rather than commands I would appreciate if the grid could operate on ICollectionView & Co.

Fife years ago I implemented my own observable collections for Silverlight and used them later for WPF. http://sourceforge.net/p/goodiesforria/code/HEAD/tree/trunk/Casimodo/Casimodo.Lib.Silverlight/Presentation/MVVM/Collections/

The new ICollectionView in uni apps is stripped down to the bones. No sort/filter descriptors, etc. I wonder why.

At least people are trying to get around that limitation. E.g. here http://www.codeproject.com/Articles/527686/A-WinRT-CollectionView-class-with-Filtering-and-So

I assume Telerik is just waiting for some official MS interfaces to pop up in order to build upon, right?

Regards & thanks,

Kasimier Buchcik

0
Ivaylo Gergov
Telerik team
answered on 20 May 2015, 08:57 AM
Hello,

It is possible to integrate the RadDataGrid with the MS ICollectionView, but as you pointed out it does not support these data operations. So for now what we can do is to provide an entry point where users can plug their custom sort/filter implementations over the source instead of relying on the built-in descriptors.

We highly appreciate your feedback. Please, let me know should you have any other questions or suggestions.

Regards,
Ivaylo Gergov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Casimodo
Top achievements
Rank 1
answered on 21 May 2015, 02:35 PM

Ok, thanks.

Tags
DataGrid
Asked by
Casimodo
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Casimodo
Top achievements
Rank 1
Share this question
or