In my aspxgrid i have created all columns dynamically, so i have a cell contains three status in three lines.e.g.
Item Status Date
1st 2nd . .... ...
Booked 2 4 5 1 2 4........
1 Available 1 1 1 1 1 1........
Not Avail 0 0 0 0 0 0........
so these cell are for 1 row . I have used customcolumndisplaytext event to do so. Now i want to give different color for three status rows. Can u guys help me with it please ? I need to do this ,there are several items and for each item i have three status.
Is there any different approach to do so please enlighten me.
Thanks,
Mriganka
You should use GridViewDataColumn.DataItemTemplate combined with simple html elements and to achieve this. Also, take a look at DataItemTemplate demo.
For simpler solution, set
e.DisplayTextin CustomColumnDisplayText to html.Here is example of
CustomColumnDisplayTextevent handler that alternates word colors inside cell: