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

Filters need to execute on the server when using RIA

6 Answers 105 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 22 Jul 2010, 04:47 AM
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.

 

6 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 22 Jul 2010, 03:26 PM
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
0
Andrew
Top achievements
Rank 1
answered on 22 Jul 2010, 03:35 PM
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.

0
Rossen Hristov
Telerik team
answered on 22 Jul 2010, 05:25 PM
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
0
Andrew
Top achievements
Rank 1
answered on 22 Jul 2010, 06:40 PM
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,,
0
Andrew
Top achievements
Rank 1
answered on 22 Jul 2010, 07:00 PM
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?

0
Rossen Hristov
Telerik team
answered on 27 Jul 2010, 12:45 PM
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
Tags
DataPager
Asked by
Andrew
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Andrew
Top achievements
Rank 1
Share this question
or