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

How to show repeated values just once?

6 Answers 130 Views
GridView
This is a migrated thread and some comments may be shown as answers.
gmendez
Top achievements
Rank 1
gmendez asked on 22 Dec 2008, 09:40 PM
Hello Telerik Team,

I'd like to know if it would be possible not to show repeated values for any given column when the data is ordered by dat column.
For example, suppose I need to provide a grid wich consist on customers data.
Each customer  could have serveral adresses and several Phone Numbers per address.
A typical view for this information would be like this:

Cust. 1 -- Addr. 1-1 -- Phone1-1
Cust. 1 -- Addr. 1-2 -- Phone1-2
Cust. 1 -- Addr. 1-3 -- Phone1-3
Cust. 2 -- Addr. 2-1 -- Phone2-1
Cust. 2 -- Addr. 2-1 -- Phone2-2

in this case I would like to present it more like a tree:

Cust. 1 -- Addr. 1-1 -- Phone1-1
           -- Addr. 1-2 -- Phone1-2
           -- Addr. 1-3 -- Phone1-3
Cust. 2 -- Addr. 2-1 -- Phone2-1
                             -- Phone2-2

May be using a tree would be better but I want to use the filter row feature to look up for a customer by any property.

Is this possible? Do you recomend another control instead?

Best regards.

Gonzalo



6 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 23 Dec 2008, 04:41 PM
Hello gmendez,

Thank you for your question.

This can be accomplished by using grouping or hierarchy. Please see our Demo Application and in particular RadGridView --> Grouping and RadGridView --> Hierarchy examples. You can find information on these features in our documentation as well.

Do not hesitate to contact me back if you have more questions.

 
Regards,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
gmendez
Top achievements
Rank 1
answered on 23 Dec 2008, 07:21 PM
Hello Nick,

Thanks for your answer.
I was aware about the grouping capabilities but that would be just a part of the solution.
I didn't find a way to present data like this:

Cust. 1 -- Addr. 1-1 -- Phone1-1
   #      -- Addr. 1-2 -- Phone1-2
   #      -- Addr. 1-3 -- Phone1-3
Cust. 2 -- Addr. 2-1 -- Phone2-1
   #           #           -- Phone2-2

Here, the # simbol represents an empty cell because it's known to have the same value as the cell above it.
Please note that I'm not talking about grouping, but to "supress" repeated values instead.
If I wanted to show the grid using groupings I think it would look like this:

Cust. 1
           -- Addr. 1-1
                            -- Phone1-1
           -- Addr. 1-2
                            -- Phone1-2
           -- Addr. 1-3
                            -- Phone1-3
Cust. 2
           -- Addr. 2-1 
                            -- Phone2-1
                            -- Phone2-2

Is taht right?

Is there any way to send you an screenshot of a form with a grid that beheaves like this?
Regards,

Gonzalo


0
gmendez
Top achievements
Rank 1
answered on 24 Dec 2008, 07:07 PM
Hello Again,

I've been performing some deeper research and to be accurate, what I'm talking about is cell merging.
I think that term is the one that best describes my need as asked in this post:

http://www.telerik.com/community/forums/winforms/gridview/how-to-merge-cell.aspx

I've fount several posts about this for the grid for ASP.NET. But what about for winfonrms ? Is it possible now?

Best regards and happy chritsmas !!

Gonzalo
0
Nick
Telerik team
answered on 29 Dec 2008, 11:06 AM
Hi gmendez,

As we mentioned, we introduced a new feature in Q3 2008 concerning specifying different row-layout. This feature though seems to be not quite what you are asking for - cells are not merged according to the data displayed, like in MS Excel. Nevertheless you can check our documentation about view definitions. We have the cell-merging added as feature request, but I'm afraid that the list for Q1 2009 is already full. We will try implementing this for the next release.

Do not hesitate to write me back if you have questions.

Kind regards,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
gmendez
Top achievements
Rank 1
answered on 29 Dec 2008, 12:58 PM
Hi Nick,

Thanks for answering.
You're right. This is not exactly what I'm looking for. I guess I'll have to wait :)
Nevertheless, I'd like to learn more about view definitions. I have already seen the documentation you're refering to . It states that three view definition's are provided out of the box, but I'm supposed to be able to define my own by implementing the IViewDefinition interface. However I didn't find any document about IViewDefinition or how to implement my own view. Now, Im not sure if the docs mean that I can build my own view definition from scratch, let's say "CellMergingViewDefinition" by implementing IViewDefinition for example, or that I just can customize any of the three you provide to get my own view....
Do you have further information / resources about this matter?
Thanks again.
Best regards,

Gonzalo
0
Nick
Telerik team
answered on 29 Dec 2008, 03:30 PM
Hi gmendez,

Thank you for your feedback. We will soon expand our documentation further concerning ViewDefinitions. Nevertheless, I am not entirely sure, that the documentation would be the main problem here. Implementation of IViewDefinition is related to implementation of a lot of logic concerning layouts, column and cell visibility and other very specific grid bits that I would not recomment you to deal with. In other words currently we did not intend this interface to be implemented by the developers.
Nevertheless, let me get more prompt help from our grid devs and see what we can do about this in a fiew days.

In the meanwhile, let us know if you have other questions.

Regards,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
gmendez
Top achievements
Rank 1
Answers by
Nick
Telerik team
gmendez
Top achievements
Rank 1
Share this question
or