Click here to Skip to main content
15,886,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

i want to display Tokens like in a Bank ....TokenNo,station id...i want to give flickering fell to my rows or painting to Top most cell...


thanks in advance
Posted

use rowdatabound event of gridview and u can give colours to required cells or rows
 
Share this answer
 
C#
void radGridView1_CellPaint(object sender, Telerik.WinControls.UI.GridViewCellPaintEventArgs e)
{
    GridDataCellElement dataCell = e.Cell as GridDataCellElement;

    if (dataCell != null && dataCell.ColumnInfo.Name == "UnitPrice")
    {
        double value = Convert.ToDouble(dataCell.Value);
        if (value == 0)
        {
            return;
        }

        Brush brush = value < 20 ? Brushes.Red : Brushes.Green;
        Size cellSize = e.Cell.Size;

        using (Font font = new Font("Segoe UI", 17))
        {
            e.Graphics.DrawString("*", font, brush, Point.Empty);
        }
    }
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900