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

[Solved] Accessing RadGrid Cells/Data

3 Answers 137 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 01 May 2008, 11:05 AM
Hi - I have a radgrid that has 3 collumns - one of these is a percentage number (i.e. a number from 0 - 100). The number is displayed as it comes from the db.

But what I want is to have a bar image in the cell with the number with the width of the bar set to the %number.

How do I access the cell that the number is in? I can't seem to access the cell and its contents. I also want to format the text so that, rather than saying just "23", I append a % to it so it says "23%" plus also the bar image.

Any ideas?

Thanks.

3 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 01 May 2008, 11:20 AM
Hello John,

Thank you for contacting us.

Please, review the following demos which should help you achieve your goal:

RadGrid columns formatting:
http://www.telerik.com/demos/aspnet/prometheus/Grid/Examples/Client/ColumnFormatting/DefaultCS.aspx

Accessing cells and rows:
http://www.telerik.com/demos/aspnet/prometheus/Grid/Examples/Programming/AccessingCellsAndRows/DefaultCS.aspx

All the best,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
John
Top achievements
Rank 1
answered on 01 May 2008, 12:02 PM
Thanks - I have tried 

DataFormatString

="{0:#%}"

But it converts 15 to 1500%

Any ideas?

0
John
Top achievements
Rank 1
answered on 01 May 2008, 12:19 PM
Ignore me

="{0:#}%"

does the job..

Tags
Grid
Asked by
John
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
John
Top achievements
Rank 1
Share this question
or