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

Suppressing repeating values in grid rows...

3 Answers 181 Views
Grid
This is a migrated thread and some comments may be shown as answers.
GoodLevitation
Top achievements
Rank 1
GoodLevitation asked on 23 Sep 2008, 02:56 PM

Hello!

I have below grid

ID    Name       Observations

1     Child1     offense type 1
1     Child1     offense type 2
1     Child1     offense type 3
2     Child2     offense type 1
2     Child2     offense type 2
2     Child2     offense type 3

And I like to suppress repeating column values to have below.  Are there any telerik grid properties already to do that?

ID    Name       Observations

1     Child1     offense type 1
                      offense type 2
                      offense type 3
2     Child2     offense type 1
                      offense type 2
                      offense type 3

Thanks in advance

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 Sep 2008, 05:41 AM
Hi,

You can achieve the above mentioned scenario using Grouping in Grid. Try adding the "Name" field to the GroupByExpression as shown below.

ASPX:
<GroupByExpressions> 
   <telerik:GridGroupByExpression> 
        <GroupByFields> 
         <telerik:GridGroupByField  FieldName="Name" FieldAlias="Name" /> 
        </GroupByFields> 
        <SelectFields> 
          <telerik:GridGroupByField  FieldName="Name" FieldAlias="Name" /> 
        </SelectFields> 
   </telerik:GridGroupByExpression> 
  </GroupByExpressions> 


Thanks
Shinu.
0
S
Top achievements
Rank 1
answered on 22 Jan 2009, 08:29 PM
The code you have suggested does not seem to suppress the repeated values in the columns.
It creates a expand/collapse group header, but leaves the group expression columns as they were.

Perhaps you could expand your suggestion to show how it can achieve the requested result.

Thanks.
0
Yavor
Telerik team
answered on 23 Jan 2009, 06:17 AM
Hello S,

One possible option in this case would be to access any cell with a repeating value, and alter its value.
I hope this suggestion helps.

Best wishes,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
GoodLevitation
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
S
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or