c# - Set row color of Telerik RadGrid -


I am using RadGrid to display data from the database I want to change the red color to red in RadGrid If the status column is displayed as "Disapproved" in the Status column, if the position is null then the row will be displayed as color white. I have tried this code, but the row still does not change red color. {{TableCell cell = (TableCell) dataBoundItem ["status"]; (== dataBoundItem ["status"]. Cell. Backallore = System Drawing Collar Red; DataBoundItem.BackColor = System.Drawing.Color.Red; If (e.Item is GridDataItem) {GridDataItem dataBoundItem1 = e.Item as GridDataItem; If (dataBoundItem1 ["status"] text = null.!) {Cell.BackColor = System.Drawing.Color.Red; DataBoundItem1.BackColor = Color.Red; Databoundime 1 ["Status"] ForeColor = Color.Red; DataBoundItem1 ["Status"]. Font.bld = true; }}}} {}

Try something like this:

  Using the system. Drawing; Secure Zero RadGrid1_ItemDataBound (Object Sender, Telerik.Web.UI.GridItemEventArgs E) {If EITM is GridDataItem} {Table Cell CelaiVe 1 = Databound Item ["Status"]; If (celltoVerify1.Text == "Disapproved") {celltoVerify1.Forecolor = Color.Red; //celltoVerify1.Font.Bold = true; //celltoVerify1.BackColor = Color.Yellow; }}}   

Let me know what works for you.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -