如何将GridView选择的行颜色LightGray更改为#F1F1F1。 [英] How to change GridView selected row color LightGray to #F1F1F1 .
本文介绍了如何将GridView选择的行颜色LightGray更改为#F1F1F1。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将GridView选择的行颜色LightGray更改为#F1F1F1。
我喜欢这样。请建议我使用当前的方法。
GridViewRow gvr =(GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
int RowIndex = gvr.RowIndex;
Grd_ProductSubCategory.Rows [RowIndex] .Cells [ 0 ]。BackColor = System.Drawing.Color。#F1F1F1(未采用 as 它 )
但接受:System.Drawing.Color.LightGray;
但我想将其改为>>> System.Drawing.Color。#F1F1F1
解决方案
试试这个
Grd_ProductSubCategory.Rows [RowIndex] .Cells [ 0 ]。BackColor = System.Drawing.ColorTranslator.FormHtml( #F1F1F1);
希望这对您有用。
How to change GridView selected row color LightGray to #F1F1F1 .
I do like this. Please suggest me over currect method.
GridViewRow gvr = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
int RowIndex = gvr.RowIndex;
Grd_ProductSubCategory.Rows[RowIndex].Cells[0].BackColor = System.Drawing.Color.#F1F1F1 (not taken as it is)
but accept : System.Drawing.Color.LightGray;
But I want to change it as >>> System.Drawing.Color.#F1F1F1
解决方案
Try this
Grd_ProductSubCategory.Rows[RowIndex].Cells[0].BackColor = System.Drawing.ColorTranslator.FormHtml("#F1F1F1);"
Hope this works for you.
这篇关于如何将GridView选择的行颜色LightGray更改为#F1F1F1。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文