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

Group Header Text

5 Answers 281 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brett
Top achievements
Rank 2
Brett asked on 09 Apr 2008, 09:18 PM
My Group Headers look like this:

adType: Web Banner

adType: Van

adType: Map

adType: Graphic Design

adType: Experience Guide

adType: Community Profile

 I would like to remove the "adType:" (fieldname) and leave the rest of the text.

Also, how do I enable expand on click for these header rows?

Brett

5 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 10 Apr 2008, 12:46 PM
Hello bslaght,

You can easily customize the group text, as shown in the following article.
As for the other functionality, you may find it worthwhile to take a look at the following example.
I hope this information helps.

All the best,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jason Lee
Top achievements
Rank 1
answered on 20 Apr 2008, 06:26 AM
I probably get the same problem relate to it....

For example:
    <telerik:RadGrid ID="radGrid" runat="server" AutoGenerateColumns="False" GridLines="None"
        OnNeedDataSource="radGrid_NeedDataSource" Skin="Vista">
        <MasterTableView>
            <GroupByExpressions>
                <telerik:GridGroupByExpression>
                    <SelectFields>
                        <telerik:GridGroupByField FieldName="groupName" />
                    </SelectFields>
                    <GroupByFields>
                        <telerik:GridGroupByField FieldName="groupName" />
                    </GroupByFields>
                </telerik:GridGroupByExpression>
            </GroupByExpressions>
            <RowIndicatorColumn Visible="False">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn Visible="False" Resizable="False">
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn HeaderText="group" UniqueName="groups" DataField="groupName"
                    Display="False">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="name" UniqueName="column1" DataField="Name">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="thread" UniqueName="column2" DataField="threadCount">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="post" UniqueName="column3" DataField="postCount">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="last" UniqueName="column" DataField="lastPerson">
                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings>
                <PopUpSettings ScrollBars="None"></PopUpSettings>
            </EditFormSettings>
        </MasterTableView>
    </telerik:RadGrid>

I don't set "HeaderText" in the GridGroupByField.  However, the grid still displays "groupName: Asia" in the group headers

Is it possible to remove "groupName" (fieldname) without any coding?

I want my group headers look like this:
"Asia"


Thank you
0
Jason Lee
Top achievements
Rank 1
answered on 22 Apr 2008, 01:29 AM
Dear Sir,

I was going to ask for a support ticket.  However,  There is no item relate to RadGrid For asp.net ajax..(I guess there is a bug in support ticket center)

Any suggestion?
0
Yavor
Telerik team
answered on 23 Apr 2008, 06:33 AM
Hello Jason,

The behavior that you mentioned is part of the default behavior of the control. You can either set the FieldAlias to a more appropriate value, according to your requirements, like this:

.aspx
   <GroupByExpressions> 
                <telerik:GridGroupByExpression> 
                    <SelectFields> 
                        <telerik:GridGroupByField FieldName="CustomerID" FieldAlias="customFieldName" /> 
                    </SelectFields> 
                    <GroupByFields> 
                        <telerik:GridGroupByField FieldName="CustomerID"/>  
                    </GroupByFields> 
                </telerik:GridGroupByExpression> 
             </GroupByExpressions> 

Or, alternatively, you can use custom code, if you would like to fieldAlias to be empty string.
I hope these are feasible options for you.
If you would like me to transfer this post into a support ticket, just let me know.

All the best,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Levi
Top achievements
Rank 1
answered on 07 Nov 2008, 06:35 PM
I have this same problem. i wish you guys would make an easier way to do this.

Please consider for future release :)

THanks,
Levi
Tags
Grid
Asked by
Brett
Top achievements
Rank 2
Answers by
Yavor
Telerik team
Jason Lee
Top achievements
Rank 1
Levi
Top achievements
Rank 1
Share this question
or