如何更改颜色gridview [英] How to change color gridview

查看:81
本文介绍了如何更改颜色gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai我在网格视图行中使用Gride视图重新打开意味着我需要更改颜色如何更改请帮助我下面是我的代码。



 受保护的  Sub  CallDGV_RowDataBound( ByVal 发​​件人作为 对象 ByVal  e  As  System.Web.UI.WebControls.GridViewRowEventArgs)句柄 CallDGV.RowDataBound 
如果 e.Row.RowType = DataControlRowType.DataRow 那么

Dim RowType As String = Convert.ToString(DataBinder .Eval(e.Row.DataItem, 状态))

如果 RowType = 重新打开 然后
e.Row.BackColor = System.Drawing.Color.Red
结束 如果

结束 如果


结束 Sub

解决方案

请看这个帖子。

我认为你有同样的问题。 />


如何对变化-VB净datagridview的行色为主,并网,复选框 - 价值 [ ^ ]



http://forums.asp。 net / t / 1510258.aspx / 1 [ ^ ]

http://blog.devexperience.net/en /5/Change_background_color_of_GridView%27s_Rows.aspx [ ^ ]



希望它有所帮助! :)

Hai i am using Gride view in the grid view row "Reopen "means i need to change the color How to change Please Help me Below is my code.

Protected Sub CallDGV_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles CallDGV.RowDataBound
       If e.Row.RowType = DataControlRowType.DataRow Then

           Dim RowType As String = Convert.ToString(DataBinder.Eval(e.Row.DataItem, "Status"))

           If RowType = "Reopen" Then
               e.Row.BackColor = System.Drawing.Color.Red
           End If

       End If


   End Sub

解决方案

Hi, see this thread.
I think you have the same problem.

How-to-change-vb-net-datagridview-row-color-based-on-grid-checkbox-value[^]

http://forums.asp.net/t/1510258.aspx/1[^]
http://blog.devexperience.net/en/5/Change_background_color_of_GridView%27s_Rows.aspx[^]

Hope it helps! :)


这篇关于如何更改颜色gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆