發表人名稱 ﹕ |
83428825 |
發表日期 ﹕ |
2013/3/18 上午 10:08:07 |
發表人來自 ﹕
|
220.228.156.50 |
|
|
原文 ﹕
再麻煩提供我CellValueChanged裏頭寫的CODE唷 範例也行,看還需要提共那些資料,我隨後附上唷 很謝謝你唷
|
附件:GridView欄位變顏色問題.docx
|
|
發表人名稱 ﹕ |
Lily |
發表日期 ﹕ |
2013/3/18 上午 11:25:03 |
發表人來自 ﹕
|
180.173.89.58 |
|
|
原文 ﹕
寫在Gridview的CellFormmatting事件。 if (e.ColumnIndex == 0) { if (Convert.ToInt32(grdOrderDetails[e.ColumnIndex, e.RowIndex].Value) 》= 30) { grdOrderDetails[6, e.RowIndex].Style.BackColor = Color.Green; } else grdOrderDetails[1, e.RowIndex].Style.BackColor = Color.Red; } grdOrderDetails是gridview的名字,您再改成您自己元件的名字,這段程式就可以直接使用了。
|
附件:
|
|
發表人名稱 ﹕ |
83428825 |
發表日期 ﹕ |
2013/3/18 上午 11:44:31 |
發表人來自 ﹕
|
202.132.81.242 |
|
|
原文 ﹕
Lily, 謝謝你唷 我知道下面的差別和如何寫了唷 grdOrderDetails[6, e.RowIndex].Style.BackColor = Color.Green; grdOrderDetails[1, e.RowIndex].Style.BackColor = Color.Red; 感謝唷
|
附件:
|
|
|