if(!IsPostBack)

            {

                //刀具类型

                ComboBoxCellType cbx_dj = new ComboBoxCellType();

               // cbx_dj.ShowButton = true;

                cbx_dj.DataSource = sjklj.sc_lb;

                cbx_dj.DataTextField = "Lb";

                //操作模式:行模式

               // this.FpSpread_tjdd.ActiveSheetView.OperationMode = OperationMode.RowMode;

                this.FpSpread_tjdd.ActiveSheetView.Columns[0].CellType = cbx_dj;

 

                //热处理地 列5

                ComboBoxCellType cbx_rcl = new ComboBoxCellType();

               // cbx_rcl.ShowButton = true;

                string[] rcld = new string[] { "无锡 周二 11天", "望江 周二 7天", "河冶 周四 5天" };

                cbx_rcl.Items = rcld;//存入到数据库的是索引

                cbx_rcl.Values = rcld;//表示存入到数据库中的是每个字符串,否则这是索引

                this.FpSpread_tjdd.ActiveSheetView.Columns[5].CellType = cbx_rcl;

 

                //显示日期选择器:fpread内置asp.netajax3.0控件,不支持4.1版本的asp.netajaxcontrol,通过添加引用---项目---解决方案找到ajaxcontrol.dll

                //也不行

                /*

                 DateCalendarCellType dc = new DateCalendarCellType();

                 AjaxControlToolkit.MaskedEditExtender mee = new AjaxControlToolkit.MaskedEditExtender();

                  mee.Mask = "99999999";

                 mee.MaskType =  AjaxControlToolkit.MaskedEditType.Number;

                 dc.DateFormat = "yyyy-MM-dd";

                 dc.Extenders.Add(mee);

                 this.FpSpread_tjdd.ActiveSheetView.Columns[7].CellType = dc;

                 this.FpSpread_tjdd.ActiveSheetView.Columns[7].BackColor = Color.MintCream;

                // dc.ShowPopupButton = true;

                */

                DateTimeCellType dc = new DateTimeCellType();//葡萄城软件公司推荐的模式            

                dc.FormatString = "yyyy-MM-dd";              

                dc.ShowPopupButton = true;//必须加入,否则无日期选择器,双击也不行

                this.FpSpread_tjdd.ActiveSheetView.Columns[7].CellType = dc;

                this.FpSpread_tjdd.ActiveSheetView.Columns[6].CellType = dc;

 

 

            }

posted on 2018-08-24 18:03  wslk  阅读(223)  评论(0)    收藏  举报