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

Group by date (outlook style)

5 Answers 190 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Edward
Top achievements
Rank 1
Edward asked on 19 Sep 2008, 02:14 PM
Is it possible to group by date similiar to outlook?$0$0$0$0Like:$0$0$0$0$0Today$0$0Yesterday$0$0Sunday$0$0Saturday$0$0...$0$0Last Week$0$0This Month$0$0Last Month$0$0Older$0

5 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 23 Sep 2008, 12:06 PM
Hi Edward,

Thank you for the question.

Currently, RadGridView does not offer the described grouping customization built-in. Nevertheless, you could implement such scenario. For example, you could add one calculated column which takes one of the needed values (today, yesterday, last week etc.) according to the some data field and then apply grouping on this column.

If you have other questions, do not hesitate to contact me again.

Greetings,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Levi
Top achievements
Rank 1
answered on 19 Oct 2008, 07:57 PM
In such a case, how can grouping be configured ot use a different field? For example... I display a regular date in the grid (10/12/2007, etc.), but when the user groups by that field, I want to use a hidden field that contains a string like "Today, Yesterday, etc." How can a group by expression be configured to use a custom field other than the one that was dragged and dropped? Otherwise I don't see a way to do what you are describing without eliminating the standard formatted date altogether.
0
Martin Vasilev
Telerik team
answered on 23 Oct 2008, 06:10 AM
Hi Levi,

Thank you for writing.

RadGridView does not support the described scenario. You cannot drag a column in the grouping area and apply grouping criteria based on another field. Nevertheless, you could add a column with expressions depending on DateTime column. After that apply grouping on this column. Please, find attached example project that demonstrates this approach.

Contact me again if you have other questions.
 

Greetings,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Bryan Ruddy
Top achievements
Rank 2
answered on 20 Dec 2010, 04:47 PM
I keep receiving an error opening this project. 
(Cannot create an instance of the abstract class or interface 'Telerik.WinControls.UI.GridViewDataColumn)

Do you have a version of this that would work with VS2010?  I believe this project may answer my question
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 20 Dec 2010, 06:11 PM
Hello,

you cannot create an instance of this. You will need to create an instance of a specific type such as GridViewTextBoxColumn or GridViewDecimalColumn for exmaple.

Hope that helps but let me know if you need more information.
Richard
Tags
GridView
Asked by
Edward
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Levi
Top achievements
Rank 1
Bryan Ruddy
Top achievements
Rank 2
Richard Slade
Top achievements
Rank 2
Share this question
or