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

Group PagerText

1 Answer 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Linus
Top achievements
Rank 2
Linus asked on 01 Jul 2010, 01:43 PM
Hi!

I know it's possible to customize the text in the pager by modifying the PagerStyle and the property PagerStyleFormat. However, when using grouping and paging together, you'll notice that in the GroupHeader there will be messages like "XXX: YYY (Showing 3 of 4 items. Group continues on the next page.)" and "XXX: YYY (... group continued from the previous page. Showing 1 of 4 items.)".

Is it possible to customize these pager messages as with PagerStyleFormat? Also, if it can be done in the ItemDataBound-event by calculating the number of items in the group, how would it be done?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 06 Jul 2010, 09:20 AM
Hi Linus,

The RadGrid.GroupingSettings collection of options give you the flexibility to localize the grid messages in the group header. If you need to completely rewrite the messages, you can use the ItemDataBound event of the grid:

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridGroupHeaderItem)
    {
        GridGroupHeaderItem groupHeader = (GridGroupHeaderItem)e.Item;
        //groupHeader.DataCell.Text gives you all the text that is shown in the group header
    }
}


Kind regards,
Veli
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Linus
Top achievements
Rank 2
Answers by
Veli
Telerik team
Share this question
or