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

Custom formatting data values

1 Answer 68 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nicolas
Top achievements
Rank 1
Nicolas asked on 06 May 2011, 09:03 PM
Hi,

I am evaluating Telerik Grid for a commercial application, and have a need to do some custom formatting on some cells. The scenario is that one of the columns would have data such as "John Smith - 1234" and I would like to display only "John Smith". The caveat is that if the user chooses to group by the column, I need the grouping to be done according to "John Smith - 1234".

In situations where there is a "John Smith - 1234" and a "John Smith - 5678", they would both display as "John Smith" in the grid, but if I group by the column they would be separate groups.

Is that supported by Telerik Grid? I could not find relevant documentation or examples.

Thank you,
Nicolas

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 12 May 2011, 07:25 AM
Hello Nicolas,

The required functionality is not supported out of the box, but can easily be achieved programmatically. You can wire the ItemDataBound event and remove the needless numbers so that the grid displays the name only. This would not affect the grouping feature and the grid will still group its data by the full value the field contains.

I have attached a small sample that demonstrates the approach above.

I hope this helps.

Greetings,
Martin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Nicolas
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or