ElTabelle 换成 MultiRow ,MaskFormat用什么可以替代?
objMaskEditor.Format = New GrapeCity.Win.ElTabelle.Editors.MaskFormat("\D{4}-\D{1}", " ", " ")ElTabelle换成 MultiRow,MaskFormat用什么可以替代?
可以参考下面的代码
private void InitializeComponent()
{
GrapeCity.Win.MultiRow.InputMan.MaskPatternField maskPatternField1 = new GrapeCity.Win.MultiRow.InputMan.MaskPatternField();
GrapeCity.Win.MultiRow.InputMan.MaskLiteralField maskLiteralField1 = new GrapeCity.Win.MultiRow.InputMan.MaskLiteralField();
GrapeCity.Win.MultiRow.InputMan.MaskPatternField maskPatternField2 = new GrapeCity.Win.MultiRow.InputMan.MaskPatternField();
GrapeCity.Win.MultiRow.InputMan.MaskLiteralField maskLiteralField2 = new GrapeCity.Win.MultiRow.InputMan.MaskLiteralField();
GrapeCity.Win.MultiRow.InputMan.MaskPatternField maskPatternField3 = new GrapeCity.Win.MultiRow.InputMan.MaskPatternField();
this.columnHeaderSection1 = new GrapeCity.Win.MultiRow.ColumnHeaderSection();
this.checkBoxCell1 = new GrapeCity.Win.MultiRow.CheckBoxCell();
this.gcMaskCell1 = new GrapeCity.Win.MultiRow.InputMan.GcMaskCell(false);
//
// Row
//
this.Row.Cells.Add(this.checkBoxCell1);
this.Row.Cells.Add(this.gcMaskCell1);
this.Row.Height = 81;
this.Row.Width = 620;
//
// columnHeaderSection1
//
this.columnHeaderSection1.Height = 40;
this.columnHeaderSection1.Name = "columnHeaderSection1";
this.columnHeaderSection1.Width = 620;
//
// checkBoxCell1
//
this.checkBoxCell1.DataField = "sex";
this.checkBoxCell1.Location = new System.Drawing.Point(179, 42);
this.checkBoxCell1.Name = "checkBoxCell1";
this.checkBoxCell1.TabIndex = 0;
//
// gcMaskCell1
//
maskPatternField1.MaxLength = 3;
maskPatternField1.MinLength = 3;
maskPatternField1.Pattern = "\\D";
maskLiteralField1.Text = "-";
maskPatternField2.MaxLength = 3;
maskPatternField2.MinLength = 3;
maskPatternField2.Pattern = "\\D";
maskLiteralField2.Text = "-";
maskPatternField3.MaxLength = 4;
maskPatternField3.MinLength = 4;
maskPatternField3.Pattern = "\\D";
this.gcMaskCell1.Fields.Add(maskPatternField1);
this.gcMaskCell1.Fields.Add(maskLiteralField1);
this.gcMaskCell1.Fields.Add(maskPatternField2);
this.gcMaskCell1.Fields.Add(maskLiteralField2);
this.gcMaskCell1.Fields.Add(maskPatternField3);
this.gcMaskCell1.Location = new System.Drawing.Point(295, 42);
this.gcMaskCell1.Name = "gcMaskCell1";
this.gcMaskCell1.ShortcutKeys.AddRange(new GrapeCity.Win.MultiRow.InputMan.ShortcutDictionaryEntry[] {
new GrapeCity.Win.MultiRow.InputMan.ShortcutDictionaryEntry(System.Windows.Forms.Keys.F2, "ShortcutClear"),
new GrapeCity.Win.MultiRow.InputMan.ShortcutDictionaryEntry(((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Return))), "ApplyRecommendedValue")});
this.gcMaskCell1.TabIndex = 1;
//
// Template1
//
this.ColumnHeaders.AddRange(new GrapeCity.Win.MultiRow.ColumnHeaderSection[] {
this.columnHeaderSection1});
this.Height = 121;
this.Width = 620;
}
页:
[1]