No QueryableDataServiceCollectionView?

9 posts, 0 answers
  1. Casimodo
    Casimodo avatar
    71 posts
    Member since:
    Mar 2015

    Posted 03 May 2015 Link to this post

    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

  2. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 06 May 2015 Link to this post

    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.

     
  3. Casimodo
    Casimodo avatar
    71 posts
    Member since:
    Mar 2015

    Posted 08 May 2015 in reply to Ivaylo Gergov Link to this post

    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

  4. Casimodo
    Casimodo avatar
    71 posts
    Member since:
    Mar 2015

    Posted 08 May 2015 in reply to Casimodo Link to this post

    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

  5. Casimodo
    Casimodo avatar
    71 posts
    Member since:
    Mar 2015

    Posted 08 May 2015 in reply to Casimodo Link to this post

    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.

  6. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 13 May 2015 Link to this post

    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
  7. Casimodo
    Casimodo avatar
    71 posts
    Member since:
    Mar 2015

    Posted 15 May 2015 in reply to Ivaylo Gergov Link to this post

    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

  8. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 20 May 2015 Link to this post

    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
  9. Casimodo
    Casimodo avatar
    71 posts
    Member since:
    Mar 2015

    Posted 21 May 2015 in reply to Ivaylo Gergov Link to this post

    Ok, thanks.

Back to Top