May 3, 2005 #1 3DDD Programmer Oct 15, 2003 30 US Hi All Can someone please let me know how to color some rows in datagrid based om values in one of the column? I tried using DataGridTextBoxColumn and Overriding Paint method but no luck. Thanks in advance.
Hi All Can someone please let me know how to color some rows in datagrid based om values in one of the column? I tried using DataGridTextBoxColumn and Overriding Paint method but no luck. Thanks in advance.
May 4, 2005 #2 tpr25 MIS Jul 8, 2004 6 US On Itemdatabound, Code: Dim drv As DataRowView = CType(e.Item.DataItem, DataRowView) Then choose your datarow: If drv("Datarow") = "Whatever You Want" Then e.Item.BackColor = System.Drawing.Color.Orange End If Upvote 0 Downvote
On Itemdatabound, Code: Dim drv As DataRowView = CType(e.Item.DataItem, DataRowView) Then choose your datarow: If drv("Datarow") = "Whatever You Want" Then e.Item.BackColor = System.Drawing.Color.Orange End If
May 4, 2005 Thread starter #3 3DDD Programmer Oct 15, 2003 30 US Thanks for your reply... Is Itemdatabound event available for datagrid control in Windows Form? I am using datagrid control in win forms. Looks like Itemdatabound is true for web based datagrid control. Any ideas?? Thanks! Upvote 0 Downvote
Thanks for your reply... Is Itemdatabound event available for datagrid control in Windows Form? I am using datagrid control in win forms. Looks like Itemdatabound is true for web based datagrid control. Any ideas?? Thanks!