private void SpreadSetting() { string[] ProductHandleTypeList = new string[]{"
","1 販売/仕入","2
販売","3
仕入"}; FarPoint.Win.Spread.CellType.ComboBoxCellType
cb3 = newFarPoint.Win.Spread.CellType.ComboBoxCellType(); cb3.ListWidth = 100; cb3.Editable = true; cb3.MaxDrop = 5; cb3.MaxLength = 1; cb3.Items = ProductHandleTypeList;
this.spdResult.ActiveSheet.Columns[5].CellType = cb3; //设置一般数据型
FarPoint.Win.Spread.CellType.NumberCellType
nmbrcell = newFarPoint.Win.Spread.CellType.NumberCellType(); nmbrcell.ShowSeparator = false; nmbrcell.DecimalPlaces = 0; nmbrcell.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.UseRegional; nmbrcell.MaximumValue = 9999; nmbrcell.MinimumValue = 1; this.spdResult.ActiveSheet.Columns[13].CellType = nmbrcell;
//设置JAN
FarPoint.Win.Spread.CellType.NumberCellType
nmbrcellJan = newFarPoint.Win.Spread.CellType.NumberCellType(); nmbrcellJan.ShowSeparator = false; nmbrcellJan.DecimalPlaces = 0; nmbrcellJan.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.UseRegional; nmbrcellJan.MaximumValue = 9999999999999; nmbrcellJan.MinimumValue = 0; this.fpSpread1.ActiveSheet.Columns[0].CellType = nmbrcellJan; this.fpSpread1.ActiveSheet.Columns[0].HorizontalAlignment =FarPoint.Win.Spread.CellHorizontalAlignment.Left;
//
FarPoint.Win.Spread.CellType.NumberCellType
numberCellType1 = newFarPoint.Win.Spread.CellType.NumberCellType(); numberCellType1.ShowSeparator = true; numberCellType1.DecimalPlaces = 0; numberCellType1.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.UseRegional; numberCellType1.MaximumValue = 99999999; numberCellType1.MinimumValue = 0; this.spdResult.ActiveSheet.Columns[20].CellType = numberCellType1;
//%数的设定
FarPoint.Win.Spread.CellType.PercentCellType
prctcell = newFarPoint.Win.Spread.CellType.PercentCellType(); prctcell.PercentSign = "%"; this.spdResult.ActiveSheet.Columns[33].CellType = prctcell; //日期的设定
FarPoint.Win.Spread.CellType.DateTimeCellType
datecell = newFarPoint.Win.Spread.CellType.DateTimeCellType(); datecell.MaximumDate = new System.DateTime(2050, 12, 31, 0, 0, 0, 0); datecell.MinimumDate = new System.DateTime(2001, 1, 1, 0, 0, 0, 0);
this.spdResult.ActiveSheet.Columns[27,30].CellType = datecell; }
|