濮阳杆衣贸易有限公司

主頁 > 知識庫 > GridView中動態(tài)設(shè)置CommandField是否可用或可見的小例子

GridView中動態(tài)設(shè)置CommandField是否可用或可見的小例子

熱門標(biāo)簽:杭州智能電話機(jī)器人 山東防封電銷卡辦理套餐 地圖標(biāo)注位置多的錢 怎樣在地圖標(biāo)注消火栓圖形 泰州手機(jī)外呼系統(tǒng)軟件 百度地圖標(biāo)注點(diǎn)擊事件 濟(jì)源人工智能電話機(jī)器人價(jià)格 廈門四川外呼系統(tǒng) 內(nèi)蒙古智能電銷機(jī)器人哪家強(qiáng)
復(fù)制代碼 代碼如下:

 protected void gvMaterial_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow || e.Row.RowType == DataControlRowType.Header)
            {
                e.Row.Cells[0].Visible = false;

            }
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                e.Row.Cells[1].Text = (gvMaterial.PageIndex * gvMaterial.PageSize + e.Row.RowIndex + 1).ToString();
                string price;
                try //讓編輯功能在特定條件下可以用
                {
                     price = ((TextBox)e.Row.Cells[4].Controls[0]).Text;//點(diǎn)編輯的時(shí)候用
                }
                catch
                {
                     price = e.Row.Cells[4].Text;    //出始時(shí)用
                }                         
                if (price == "" || price == "nbsp;")
                {
                    e.Row.Cells[7].Controls[0].Visible = false;
                }
                else
                {
                    e.Row.Cells[7].Controls[0].Visible = true;
                }
            }
        }
 
您可能感興趣的文章:
  • 用Command對象和RecordSet對象向數(shù)據(jù)庫增加記錄哪一個(gè)更好
  • 使用Jmail及Winwebmail發(fā)信時(shí)系統(tǒng)記錄中的錯(cuò)誤:502 Error: command ...
  • Delphi Command模式
  • asp中command的在單條記錄時(shí),有些字段顯示為空的問題
  • javascript document.execCommand() 常用解析
  • asp.net gridview的Rowcommand命令中獲取行索引的方法總結(jié)
  • php設(shè)計(jì)模式 Command(命令模式)
  • php設(shè)計(jì)模式 Command(命令模式)
  • 獲取Repeter的Item和ItemIndex/CommandArgument實(shí)現(xiàn)思路與代碼
  • 解決VS2012 Express的There was a problem sending the command to the program問題
  • bash scp command not found的解決方法
  • document.execCommand()的用法小結(jié)
  • pip 錯(cuò)誤unused-command-line-argument-hard-error-in-future解決辦法
  • 在RowCommand事件中獲取索引值示例代碼
  • ON_COMMAND_RANGE多個(gè)按鈕響應(yīng)一個(gè)函數(shù)的解決方法
  • C#命令模式(Command Pattern)實(shí)例教程
  • ASP基礎(chǔ)知識Command對象講解

標(biāo)簽:洛陽 朔州 喀什 周口 新鄉(xiāng) 臺州 朝陽 百色

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《GridView中動態(tài)設(shè)置CommandField是否可用或可見的小例子》,本文關(guān)鍵詞  GridView,中,動態(tài),設(shè)置,CommandField,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《GridView中動態(tài)設(shè)置CommandField是否可用或可見的小例子》相關(guān)的同類信息!
  • 本頁收集關(guān)于GridView中動態(tài)設(shè)置CommandField是否可用或可見的小例子的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    当雄县| 赞皇县| 通渭县| 英超| 图木舒克市| 保德县| 永城市| 手游| 彝良县| 当雄县| 古浪县| 威信县| 仙桃市| 衡阳市| 商洛市| 左云县| 曲水县| 龙山县| 皋兰县| 西宁市| 大安市| 阳泉市| 甘谷县| 会东县| 涞水县| 汉沽区| 河源市| 达拉特旗| 察雅县| 乌兰察布市| 深州市| 和平区| 闻喜县| 崇文区| 台江县| 普定县| 师宗县| 云南省| 弥渡县| 三门峡市| 峨山|