mbernierhq
asked on
Bar chart with datagrid
Hi,
I need to represent data by a graphic bar in a datagrid, someone know how to do this??
Exemple:
|------------------------- ---------- ---------- --------|
|Computers | 100 | XXXXXXXXX |
|Printers | 50 | XXXXX |
|------------------------- ---------- ---------- --------|
Of course I don't want Xs but a real colored bar.
I need to represent data by a graphic bar in a datagrid, someone know how to do this??
Exemple:
|-------------------------
|Computers | 100 | XXXXXXXXX |
|Printers | 50 | XXXXX |
|-------------------------
Of course I don't want Xs but a real colored bar.
Make a template column for your bar.
- add an image tag in the template column (with a small bar with a size of 2 pixels) etc.
- adjust its width according to your calculation inside the ItemDataBound event handler.
should be simple enough.
regards,
KS
- add an image tag in the template column (with a small bar with a size of 2 pixels) etc.
- adjust its width according to your calculation inside the ItemDataBound event handler.
should be simple enough.
regards,
KS
ASKER
I don't want to put code in HTML, I want all code in the codebehind page. I'm using VB with ASP.NET.
I also need it to be inside the datagrid not a graphic by itself.
I also need it to be inside the datagrid not a graphic by itself.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://msdn.microsoft.com/msdnmag/issues/02/02/ASPDraw/