Tuesday, March 12, 2024

Grid data bound column empty text change Telerik - GridBoundColumn Text color change

 protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 

    if (e.Item is GridDataItem) 

    { 

        GridDataItem item = (GridDataItem)e.Item; 

        item["ColumnUniqueName"].Style.Add("Color","Red"); 

    } 


 protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 

GridDataItem item = (GridDataItem)Item;

                if (item["boundColumnApplicationSubject"].Text == Unavailable)

                {

                    item["boundColumnApplicationSubject"].Style.Add("Color", "Red");

                }

}

<telerik:GridBoundColumn HeaderStyle-Font-Bold="true" HeaderText="Subject" DataField="ApplicationSubject" UniqueName="boundColumnApplicationSubject" />


reference:- https://www.telerik.com/forums/change-text-color-on-gridboundcolum


No comments:

Post a Comment