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

GridGroupByField With HyperLink?

1 Answer 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David Frost
Top achievements
Rank 1
David Frost asked on 12 Sep 2008, 01:30 PM
I have a RadGrid based from Telerik.Web.UI.  One of my columns "AccountName" is replicated for each record so to save space I used this code to group by the "AccountName"

<GroupByExpressions> 
    <telerik:GridGroupByExpression> 
        <SelectFields> 
            <telerik:GridGroupByField FieldAlias="AccountName" FieldName="AccountName" HeaderText="Account">  
            </telerik:GridGroupByField> 
        </SelectFields> 
        <GroupByFields> 
            <telerik:GridGroupByField FieldName="AccountName" FieldAlias="AccountName" HeaderText="Account">  
            </telerik:GridGroupByField> 
        </GroupByFields> 
    </telerik:GridGroupByExpression>                      
</GroupByExpressions> 

Which works fine however the users want to drill down on the "AccountName" field to a details page.  Is there a way to add a "NavigateURL" or hyperlink to this group by expression?

If not my work around is to create a GridHyperLinkColumn with static text "View Detail" to allow the user to go to the details page.  Not as clean and my horizontal space on the page is very limited.

Thanks! 

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 15 Sep 2008, 02:20 PM
Hi David,

Although the functionality you request is not supported out-of-the-box by our web grid, you may consider modifying the GridGroupHeaderItem text by wrapping the actual text in an anchor tag to redirect the user to another location (based on the text value in the group header).

How to customize the group headers content in RadGrid you can see from the following article in the documentation:

http://www.telerik.com/help/aspnet-ajax/grdcustomizegridgroupheaderitem.html

I hope this is feasible solution for your case.

Best regards,
Stephen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
David Frost
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or