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

radgrid filtering

4 Answers 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
JJ
Top achievements
Rank 1
JJ asked on 24 Jun 2011, 09:46 PM

 Problem: after put rgDataRetrieval.MasterTableView.FilterExpression=... on grid PreRender makes grid all the column filter function not work. Please help!

 

I have a radgrid, has allow filter for all the columns turn to true.
I also need to have a date manually filtered by a search button click to filter the datagrid manually by start and end date.

I put the following code on PreRender, the serach button manually filter works fine, but after put  rgDataRetrieval.MasterTableView.FilterExpression=... in PreRender, the grid column auto filter for all the columns does not work right- not work at all

protected
void rgDataRetrieval_PreRender(object sender, EventArgs e)

 

{

 

 

DateTime startDate =Convert.ToDateTime("1/1/1900");

 

 

 

DateTime endDate = Convert.ToDateTime("1/1/2900");

 

 

 

if (rdpFrom.SelectedDate!=null)

 

startDate=rdpFrom.SelectedDate.Value;

 

 

if (rdpTo.SelectedDate!=null)

 

endDate=rdpTo.SelectedDate.Value.AddDays(1);

 

 

if (rdpFrom.SelectedDate != null || rdpTo.SelectedDate != null)

 

{

rgDataRetrieval.MasterTableView.FilterExpression =

 

null;

 

rgDataRetrieval.MasterTableView.FilterExpression =

 

"(([DownloadEnd] >= '" + startDate +

 

 

 

"') AND ([DownloadEnd] <= '" + endDate + "')) ";

 

rgDataRetrieval.MasterTableView.Rebind();

}

}


4 Answers, 1 is accepted

Sort by
0
Mira
Telerik team
answered on 27 Jun 2011, 12:34 PM
Hello JJ,

I have followed your scenario and prepared a sample project for you demonstrating how the desired functionality can be implemented. You can find it attached to this message.

I hope it helps.

Best wishes,
Mira
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
JJ
Top achievements
Rank 1
answered on 28 Jun 2011, 04:17 PM
Thanks Mira. I see I have have missed.
0
Balasubramanian
Top achievements
Rank 1
answered on 11 Jul 2011, 07:29 PM
Hi,

Do you guys have a documentation which defines all the filter options available in rad grid, with details on how they function with different columns with different data type?
If you have one can you please share that with me. We use RadGrid in our application and are documenting the application user guide.
Any documentation on the rad grid filtering would be of great help.

Thank you.

Regards
Balasubramanian Ramachandran.
0
Shinu
Top achievements
Rank 2
answered on 12 Jul 2011, 04:34 AM
Hello Balasubramanian,

Take a look at the following help article and demo which explains more on filtering.

Basic filtering(Documentation) .
Basic Filtering (Demo).

Thanks,
Shinu.
Tags
Grid
Asked by
JJ
Top achievements
Rank 1
Answers by
Mira
Telerik team
JJ
Top achievements
Rank 1
Balasubramanian
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or