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

Filtering DateTime

6 Answers 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Radoslaw
Top achievements
Rank 1
Radoslaw asked on 11 Jun 2008, 09:28 AM
Hi!

I spent so much time implementing filtering on the DateTime column and now i want to ask for help.

I started from this http://www.telerik.com/help/aspnet/grid/grdfilteringfordatetimecolumnwithdataformatstring.html

but i realised  that the example
1. has errors in syntaxt (c#)
2. works only with one column (if i have 10 columns and i clear filter value of the datetime column, the filter values are set to empty string also for all columns)

Now i am using ItemCommand and CommandName for filtering. i set Canceled = true and try to do filtering manually. But it looks very bad. i have to check all filters, put them again to textboxes, generate filterexpression for the grid and rebind.

Can You give me any tips to haw to do this?
Thanks a lot
radek

6 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 16 Jun 2008, 08:26 AM
Hi Radoslaw,

You can use the build-in GridDateTimeColumn. Another approach will be to implement your own column in which to incorporate the desired behavior. An example of similar approach can be found here.

Sincerely yours,
Rosen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Radoslaw
Top achievements
Rank 1
answered on 19 Jun 2008, 06:39 AM
Hello!

It seems to me that all the given solutions work only with one column. If i have datetime column (dd-MM-yyyy) and others i have problems.

Should i build the filter expression manually?
0
Shinu
Top achievements
Rank 2
answered on 19 Jun 2008, 10:37 AM
Hi,

Are you binding the Grid using AdvanceDataBinding techniques?
Advanced data-binding

Shinu.
0
Rosen
Telerik team
answered on 24 Jun 2008, 07:57 AM
Hello Radoslaw,

Unfortunately I do not understand thoroughly what you are trying to achieve. Therefore can you please give us some more information about your scenario and if possible to send us (attached to a formal thicket) a sample project in which this can be reproduced? Thus I will do my best to assist you further.

Best regards,
Rosen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Radoslaw
Top achievements
Rank 1
answered on 24 Jun 2008, 04:00 PM
maybe i will try to draw it:)
i see now that  my post was unclear, i will try in few words describe it better.

One RadGrid with 5 columns (1 datetime, 4 simply GridDataBound with strings)
I would like to filter the datetime column with the following pattern: dd-MM-yyyy.

(The example i mentioned in my first post works only with one column.)

I hope now you understand my problem.

best regards,
radek
0
Rosen
Telerik team
answered on 27 Jun 2008, 10:34 AM
Hello Radoslaw,

I have attached a simple page that illustrate filtering with GridDateTime column with dates in this formatting dd-MM-yyyy. Please give it a try and see if I'm leaving something out.

Sincerely yours,
Rosen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Radoslaw
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Radoslaw
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or