在gridview中編輯時 用dropdownlist

taogchan發表於2011-10-17
.aspx頁面的Gridview:
 

               
                       
                   

                   
                                                    DataValueField="CAMPAIGN_NAME" DataTextField="CAMPAIGN_NAME" SelectedValue=''>
                       

                   

                   
                   
               
.CS:
 protected void GVobject_RowEditing(object sender, GridViewEditEventArgs e)
        {
            this.GVobject.EditIndex = e.NewEditIndex;
            if (Session["IsoClick"] != null && Convert.ToBoolean(Session["IsoClick"].ToString()))//判斷查詢按鈕是否被點選
            {
                get_objectdata();
            }
            else
            {
                ObjectShow();//重新繫結一次資料
            }
        }
        public DataSet ddlcampaign()
        {
            EDM_eMail edm = new EDM_eMail();
            DataSet ds = edm.Show_Campaign_id();
            return ds;
        }
 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22392018/viewspace-709237/,如需轉載,請註明出處,否則將追究法律責任。

相關文章