Subscribe to web2feel.com
Subscribe to web2feel.com

Font Color in Row Grid Control C#

Diposting oleh Unknown Selasa, 28 Juni 2016

private void gridView1_RowStyle(object sender, RowStyleEventArgs e)
        {
            var view = sender as GridView;
            if (e.RowHandle < 0) return;
            var str = view.GetRowCellDisplayText(e.RowHandle, view.Columns["last_login"]);
            if (!string.IsNullOrEmpty(str))
            {
                if (str== DateTime.Now)
                {                   
                    e.Appearance.ForeColor = Color.Blue;
                }
            }
           
        }