Filters need to execute on the server when using RIA

7 posts, 0 answers
  1. Andrew
    Andrew avatar
    68 posts
    Member since:
    Jul 2010

    Posted 21 Jul 2010 Link to this post

    I really like your product, but there is one aspect that to me, is a deal killer unless there is a reasonable solution.

    Your datagrids have great filtering features built-in, which to me is a huge selling point.  But I plan to be working with a massive database, so I will NOT be retrieving it all at once.  So the filters have to apply at the server as part of a SQL query rather than against the local data.

    I seem to be able to get that to work by just using filterdescriptors in my ria controls along with the regular datagrid. But then I have to collect the inputs in ugly textboxes, not nearly as cool as your interface.  Although I would also love the option to have a startwith or includes box in the first row of the table under each column (select type of box by column).

    By the way to avoid problems with null filters, I use IgnoredValue="" in each filterdescriptor statement.

    So the real question is, can your neat top of column filter settings be converted to filterdescriptors so RIA can execute them against the server instead of locally?

    I hope there is a solution, because I love so many things you have done with your RadDataGrid.

     

  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 22 Jul 2010 Link to this post

    Hello Andrew,

    Here is one online example using our brand-new control RadDataFilter.

    Here is my blog post that does that by creating a Custom Filtering Control of RadGridView. The default filter is replaced completely with a custom one which communicates directly with the DomainDataSource by attaching various FilterDescriptors. This could be a good starting point.

    Finally, here is another online example that uses RadGridView and "translates" its "client-side" "FilterDescriptor's to the DomainDataSource "server-side" FilterDescriptors.

    I am sure that with a little modification you can tailor one of those to your particular requirements.

    I hope this helps. Let me know if you have any other questions.

    Sincerely yours,
    Ross
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Andrew
    Andrew avatar
    68 posts
    Member since:
    Jul 2010

    Posted 22 Jul 2010 Link to this post

    I have downloaded your example tried to use it in my application.  I am not autogenerating columns so I need some help changing it to work.  I have uploaded my whole project on a support ticket related to delete crashing when I do an update, so you can see it there.  The test view is ssradCustomers.  Please advice what I need to add to change the filters to server side.

    Although this file is not huge (under 2000 records) it is my test case to apply the technique to much larger files.

  5. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 22 Jul 2010 Link to this post

    Hello Andrew,

    Which of the several examples that I have mentioned have you downloaded? The fact whether columns are auto-generated or not does not matter. What is the exact problem with non-auto-generated columns. They are as much columns as the auto-generated ones. The only difference is that we create the auto-generated columns, while you create the non-auto-generated columns. But apart from that they are the same class. Do you have a specific question about the columns?

    Please take a look at my answer to the other forum post.

    Regards,
    Ross
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  6. Andrew
    Andrew avatar
    68 posts
    Member since:
    Jul 2010

    Posted 22 Jul 2010 Link to this post

    I downloaded and used PureServerSideFiltering as my basis.  If you look at my code you will see I created a view SSFiltering, and also added the necessary code to typeextension.cs and ssradCustomers.xaml...

    I had to change some references, as they must have been for a previous version of silverlight, but it all executes now.

    My question is that since you have the following code, that assumes autogenerated columns, what code do I use instead for the manual columns.


     

     

     this.radGridView1.AutoGeneratingColumn += this.OnGridAutoGeneratingColumn;

     


     

     

    private void OnGridAutoGeneratingColumn(object sender, GridViewAutoGeneratingColumnEventArgs e)

     

     etc,,
  7. Andrew
    Andrew avatar
    68 posts
    Member since:
    Jul 2010

    Posted 22 Jul 2010 Link to this post

    One more question, give what I am trying to accomplish, which is to use your all your filter options, both the ones above the columns, and your new control, is this the best example to base my work on?

  8. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2478 posts

    Posted 27 Jul 2010 Link to this post

    Hello Andrew,

    Since you have defined your columns manually, you can simply say something like this:

    var column = this.clubsGrid.Columns[0] as GridViewBoundColumnBase;
    if (column != null)
    {
    //...here you have a reference to the first column just like you do inside the AutoGeneratingColumn event handler.
    }

    As for RadDataFilter -- it is an alternative to the grid's built- in filtering. You should never use them both. Choose either RadDataFilter or RadGridView's column filters, but do not mix them together. This is because you can create filters that are so complex with RadDataFilter and RadGridView's specific filtering control has not way of showing them.

    I hope this helps.

    All the best,
    Ross
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
Back to Top
DevCraft banner