private void ExportTo(SmGridView view, IExportProvider provider) { try { try { view.Columns["sel"].VisibleIndex = -1; } catch { } BaseExportLink link = view.CreateExportLink(provider); (link as GridViewExportLink).ExpandAll = true; (link as GridViewExportLink).ExportDetails = true; link.ExportTo(true); view.Columns[0].VisibleIndex = 0; } finally { } }
private void GridAdjustment(DataSet ds) { int num3; int count = ds.Tables.Count; SmGridView[] viewArray = new SmGridView[count]; viewArray[0] = base.view; int index = 1; for (num3 = 0; num3 < count; num3++) { string relationName = ""; if (ds.Tables[num3].ParentRelations.Count > 0) { viewArray[index] = new SmGridView(base.grid); viewArray[index].OptionsDetail.ShowDetailTabs = true; viewArray[index].OptionsDetail.EnableDetailToolTip = true; relationName = ds.Tables[num3].ParentRelations[0].RelationName; } if (relationName != "") { base.grid.LevelTree.Nodes.Add(relationName, viewArray[index]); } } for (num3 = 0; num3 < count; num3++) { viewArray[num3].OptionsView.ColumnAutoWidth = ds.Tables[num3].Columns.Count < 8; if (num3 > 0) { viewArray[num3].OptionsView.ShowGroupPanel = false; } viewArray[num3].DetailHeight = 500; } }
private void InitializeComponent() { this.grid = new SmGridControl(); this.view = new SmGridView(); this.rschkSel = new RepositoryItemCheckEdit(); this.bgLoadDataWorker = new BackgroundWorker(); this.grid.BeginInit(); this.view.BeginInit(); this.rschkSel.BeginInit(); base.SuspendLayout(); this.grid.Dock = DockStyle.Fill; this.grid.EmbeddedNavigator.Name = ""; this.grid.Location = new Point(0, 0); this.grid.MainView = this.view; this.grid.Name = "grid"; this.grid.RepositoryItems.AddRange(new RepositoryItem[] { this.rschkSel }); this.grid.Size = new Size(480, 0x1b0); this.grid.TabIndex = 4; this.grid.ViewCollection.AddRange(new BaseView[] { this.view }); this.view.GridControl = this.grid; this.view.Name = "view"; this.view.OptionsMenu.EnableColumnMenu = false; this.view.OptionsMenu.EnableFooterMenu = false; this.view.OptionsMenu.EnableGroupPanelMenu = false; this.view.OptionsView.EnableAppearanceEvenRow = true; this.view.OptionsView.EnableAppearanceOddRow = true; this.view.PaintStyleName = "Skin"; this.view.DoubleClick += new EventHandler(this.ViewDoubleClick); this.rschkSel.AutoHeight = false; this.rschkSel.Name = "rschkSel"; this.rschkSel.NullStyle = StyleIndeterminate.Unchecked; this.rschkSel.EditValueChanged += new EventHandler(this.rschkSel_EditValueChanged); this.bgLoadDataWorker.DoWork += new DoWorkEventHandler(this.LoadDataAsync); this.bgLoadDataWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.OnLoadDataCompleted); base.Controls.Add(this.grid); base.Name = "WfAbstractBox"; base.Size = new Size(480, 0x1b0); this.grid.EndInit(); this.view.EndInit(); this.rschkSel.EndInit(); base.ResumeLayout(false); }
private void InitializeComponent() { this.grid = new SmGridControl(); this.view = new SmGridView(); this.grid.BeginInit(); this.view.BeginInit(); base.SuspendLayout(); this.grid.Dock = DockStyle.Fill; this.grid.EmbeddedNavigator.Name = ""; this.grid.ImeMode = ImeMode.On; this.grid.Location = new Point(2, 2); this.grid.MainView = this.view; this.grid.Name = "grid"; this.grid.Size = new Size(0x18c, 340); this.grid.TabIndex = 0; this.grid.ViewCollection.AddRange(new BaseView[] { this.view }); this.view.Appearance.EvenRow.BackColor = Color.LightSkyBlue; this.view.Appearance.EvenRow.BackColor2 = Color.GhostWhite; this.view.Appearance.EvenRow.GradientMode = LinearGradientMode.ForwardDiagonal; this.view.Appearance.EvenRow.Options.UseBackColor = true; this.view.Appearance.EvenRow.Options.UseFont = true; this.view.Appearance.OddRow.BackColor = Color.NavajoWhite; this.view.Appearance.OddRow.BackColor2 = Color.White; this.view.Appearance.OddRow.GradientMode = LinearGradientMode.BackwardDiagonal; this.view.Appearance.OddRow.Options.UseBackColor = true; this.view.Appearance.OddRow.Options.UseFont = true; this.view.GridControl = this.grid; this.view.HorzScrollVisibility = ScrollVisibility.Always; this.view.Name = "view"; this.view.OptionsMenu.EnableColumnMenu = false; this.view.OptionsMenu.EnableFooterMenu = false; this.view.OptionsMenu.EnableGroupPanelMenu = false; this.view.OptionsView.EnableAppearanceEvenRow = true; this.view.OptionsView.EnableAppearanceOddRow = true; this.view.PaintStyleName = "Skin"; this.view.VertScrollVisibility = ScrollVisibility.Always; this.view.FocusedRowChanged += new FocusedRowChangedEventHandler(this.view_FocusedRowChanged); this.view.DoubleClick += new EventHandler(this.view_DoubleClick); this.view.CustomRowCellEdit += new CustomRowCellEditEventHandler(this.view_CustomRowCellEdit); base.Controls.Add(this.grid); base.Name = "AdjunctEdit"; base.Padding = new Padding(2); base.Size = new Size(400, 0x158); this.grid.EndInit(); this.view.EndInit(); base.ResumeLayout(false); }
private void InitializeComponent() { this.components = new Container(); ComponentResourceManager manager = new ComponentResourceManager(typeof(fSelectParticipant)); this.imageList1 = new ImageList(this.components); this.panel1 = new Panel(); this.btnCancel = new Button(); this.btnOK = new Button(); this.grid = new SmGridControl(); this.view = new SmGridView(); this.panel1.SuspendLayout(); this.grid.BeginInit(); this.view.BeginInit(); base.SuspendLayout(); this.imageList1.ImageStream = (ImageListStreamer) manager.GetObject("imageList1.ImageStream"); this.imageList1.TransparentColor = Color.Fuchsia; this.imageList1.Images.SetKeyName(0, ""); this.imageList1.Images.SetKeyName(1, ""); this.imageList1.Images.SetKeyName(2, ""); this.panel1.Controls.Add(this.btnCancel); this.panel1.Controls.Add(this.btnOK); this.panel1.Dock = DockStyle.Bottom; this.panel1.Location = new Point(0, 0x1a6); this.panel1.Name = "panel1"; this.panel1.Size = new Size(0x21e, 0x33); this.panel1.TabIndex = 11; this.btnCancel.Anchor = AnchorStyles.Right | AnchorStyles.Bottom; this.btnCancel.Location = new Point(460, 12); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new Size(0x48, 0x1a); this.btnCancel.TabIndex = 12; this.btnCancel.Text = "取消"; this.btnCancel.Click += new EventHandler(this.btnCancel_Click); this.btnOK.Anchor = AnchorStyles.Right | AnchorStyles.Bottom; this.btnOK.Location = new Point(0x174, 12); this.btnOK.Name = "btnOK"; this.btnOK.Size = new Size(80, 0x1a); this.btnOK.TabIndex = 11; this.btnOK.Text = "确定"; this.btnOK.Click += new EventHandler(this.btnOK_Click); this.grid.Dock = DockStyle.Fill; this.grid.EmbeddedNavigator.Name = ""; this.grid.ImeMode = ImeMode.NoControl; this.grid.Location = new Point(0, 0); this.grid.MainView = this.view; this.grid.Name = "grid"; this.grid.Size = new Size(0x21e, 0x1a6); this.grid.TabIndex = 12; this.grid.ViewCollection.AddRange(new BaseView[] { this.view }); this.view.GridControl = this.grid; this.view.HorzScrollVisibility = ScrollVisibility.Always; this.view.Name = "view"; this.view.OptionsMenu.EnableColumnMenu = false; this.view.OptionsMenu.EnableFooterMenu = false; this.view.OptionsMenu.EnableGroupPanelMenu = false; this.view.OptionsView.EnableAppearanceEvenRow = true; this.view.OptionsView.EnableAppearanceOddRow = true; this.view.PaintStyleName = "Skin"; this.view.VertScrollVisibility = ScrollVisibility.Always; this.AutoScaleBaseSize = new Size(6, 15); base.ClientSize = new Size(0x21e, 0x1d9); base.ControlBox = false; base.Controls.Add(this.grid); base.Controls.Add(this.panel1); base.LookAndFeel.UseDefaultLookAndFeel = false; base.Name = "fSelectParticipant"; this.Text = "请选择"; base.Load += new EventHandler(this.fSelectParticipant_Load); base.Shown += new EventHandler(this.fSelectParticipant_Shown); this.panel1.ResumeLayout(false); this.grid.EndInit(); this.view.EndInit(); base.ResumeLayout(false); }