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

[Solved] "Easy Way" to show max. characters "x" in a column?

2 Answers 71 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 10 Mar 2010, 10:42 AM
Hi!

Is there a way that I can tell the radgrid, that I only want - for example - max. 20 characters to be shown in a column (optimal: replenished by "..."), although the database field is much longer (for example 50 characters). I do not want to use wrapping. Of course, when I get to the detail view of the datarow (EditMode = PopUp in conjunction with usercontrol), the whole content of the column should be displayed and editable.

Thanks

Michael

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 10 Mar 2010, 10:52 AM
Hi Michael,

In order to achieve the desired behavior, you have to modify the data cells' Text in ItemDataBound.

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

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/accessingcellsandrows/defaultcs.aspx

Greetings,
Dimo
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.
0
Michael
Top achievements
Rank 1
answered on 10 Mar 2010, 11:33 AM
Hi Dimo!

It works!! Thank you for your fast reply!

Michael
Tags
Grid
Asked by
Michael
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Michael
Top achievements
Rank 1
Share this question
or