private void SetThreeState(GridViewColumn column) { GridViewCheckBoxColumn viewCheckBoxColumn = column as GridViewCheckBoxColumn; if (viewCheckBoxColumn == null) { return; } this.checkBoxEditor.ThreeState = viewCheckBoxColumn.ThreeState; }
protected override void UpdateInfoCore() { base.UpdateInfoCore(); GridViewCheckBoxColumn columnInfo = this.ColumnInfo as GridViewCheckBoxColumn; if (columnInfo == null) { return; } this.shouldCheckDataRows = columnInfo.ShouldCheckDataRows; }
protected override SizeF ArrangeOverride(SizeF finalSize) { this.ArrowPosition = this.SetArrowPosition(); RectangleF clientRectangle = this.GetClientRectangle(finalSize); double width = (double)clientRectangle.Width; if (this.StackLayout.Visibility == ElementVisibility.Visible && this.FilterButton.Visibility == ElementVisibility.Visible) { clientRectangle.Width -= this.StackLayout.DesiredSize.Width; if (this.RightToLeft) { clientRectangle.X += this.StackLayout.DesiredSize.Width; } } if (this.ArrowPosition != GridHeaderCellElement.ArrowPositionEnum.Top && this.ArrowPosition != GridHeaderCellElement.ArrowPositionEnum.Bottom) { clientRectangle.Width -= (float)(2.0 * (double)this.Arrow.DesiredSize.Width + 2.0); } if (this.checkBox.Visibility == ElementVisibility.Visible) { clientRectangle.Width -= this.checkBox.DesiredSize.Width; switch (((GridViewCheckBoxColumn)this.ColumnInfo).HeaderCheckBoxPosition) { case HorizontalAlignment.Right: clientRectangle.X = 2f; break; case HorizontalAlignment.Center: clientRectangle.X = (float)((double)clientRectangle.Width / 2.0 + (double)this.checkBox.DesiredSize.Width / 2.0); break; } } this.Layout.Arrange(clientRectangle); foreach (RadElement child in this.Children) { if (child.Visibility != ElementVisibility.Collapsed) { if (child == this.Arrow) { if (!this.ViewTemplate.EnableSorting) { child.Visibility = ElementVisibility.Hidden; } else if ((double)finalSize.Width - 2.0 * (double)this.Arrow.DesiredSize.Width > 0.0 && 2.0 * (double)this.Arrow.DesiredSize.Width < (double)finalSize.Width) { if (this.SortOrder != RadSortOrder.None && this.ColumnInfo.SortOrder != RadSortOrder.None) { child.Visibility = ElementVisibility.Visible; } this.ArrangeArrow(finalSize, child); } else { child.Visibility = ElementVisibility.Hidden; } } else if (child == this.StackLayout) { if (this.RightToLeft) { this.StackLayout.Arrange(new RectangleF(0.0f, (float)(((double)finalSize.Height - (double)this.StackLayout.DesiredSize.Height) / 2.0), this.StackLayout.DesiredSize.Width, this.StackLayout.DesiredSize.Height)); } else { this.StackLayout.Arrange(new RectangleF(finalSize.Width - this.StackLayout.DesiredSize.Width, (float)(((double)finalSize.Height - (double)this.StackLayout.DesiredSize.Height) / 2.0), this.StackLayout.DesiredSize.Width, this.StackLayout.DesiredSize.Height)); } } else if (child == this.checkBox) { GridViewCheckBoxColumn columnInfo = (GridViewCheckBoxColumn)this.ColumnInfo; RectangleF rectangleF = new RectangleF(0.0f, 0.0f, clientRectangle.Width + this.checkBox.DesiredSize.Width, finalSize.Height); switch (columnInfo.HeaderCheckBoxPosition) { case HorizontalAlignment.Left: rectangleF.X = 2f; break; case HorizontalAlignment.Right: rectangleF.X = rectangleF.Width - this.checkBox.DesiredSize.Width; break; case HorizontalAlignment.Center: rectangleF.X = (float)((double)rectangleF.Width / 2.0 - (double)this.checkBox.DesiredSize.Width / 2.0); break; } rectangleF.Y = (float)((double)finalSize.Height / 2.0 - (double)this.checkBox.DesiredSize.Height / 2.0); this.ArrangeElement(child, finalSize, new RectangleF(rectangleF.Location, this.checkBox.DesiredSize)); } else { this.ArrangeElement(child, finalSize, clientRectangle); } } } return(finalSize); }
private void FormatDataGrid() { try { Telerik.WinControls.UI.Localization.RadGridLocalizationProvider.CurrentProvider = new Infrastructure.WinForms.Controls.MySpanishRadGridLocalizationProvider(); this.grdItems.Columns.Clear(); this.grdItems.AllowAddNewRow = false; Telerik.WinControls.UI.GridViewCommandColumn commandColumn; commandColumn = new Telerik.WinControls.UI.GridViewCommandColumn(); commandColumn.Name = "Edit"; commandColumn.HeaderText = "Editar"; commandColumn.DefaultText = "Editar"; commandColumn.UseDefaultText = true; this.grdItems.Columns.Add(commandColumn); this.grdItems.Columns["Edit"].AllowSort = false; this.grdItems.Columns["Edit"].AllowFiltering = false; commandColumn = new Telerik.WinControls.UI.GridViewCommandColumn(); commandColumn.Name = "Delete"; commandColumn.HeaderText = "Eliminar"; commandColumn.DefaultText = "Eliminar"; commandColumn.UseDefaultText = true; this.grdItems.Columns.Add(commandColumn); this.grdItems.Columns["Delete"].AllowSort = false; this.grdItems.Columns["Delete"].AllowFiltering = false; this.grdItems.Columns.Add("TIPO_DescPais", "País", "TIPO_DescPais"); this.grdItems.Columns.Add("PUER_CodEstandar", "Código Estandar", "PUER_CodEstandar"); this.grdItems.Columns.Add("PUER_Nombre", "Nombre", "PUER_Nombre"); this.grdItems.Columns.Add("PUER_CodAduana", "Codigo Aduana", "PUER_CodAduana"); Telerik.WinControls.UI.GridViewCheckBoxColumn _favorito = new Telerik.WinControls.UI.GridViewCheckBoxColumn(); _favorito.Name = "PUER_Favorito"; _favorito.HeaderText = "Favorito"; _favorito.FieldName = "PUER_Favorito"; this.grdItems.Columns.Add(_favorito); //this.grdItems.Columns.Add("PUER_Favorito", "Favorito", "PUER_Favorito"); Telerik.WinControls.UI.GridViewCheckBoxColumn _activo = new Telerik.WinControls.UI.GridViewCheckBoxColumn(); _activo.Name = "PUER_Activo"; _activo.HeaderText = "Activo"; _activo.FieldName = "PUER_Activo"; this.grdItems.Columns.Add(_activo); //this.grdItems.Columns.Add("PUER_Activo", "Activo", "PUER_Activo"); grdItems.BestFitColumns(); tsmColumnas.DropDownItems.Clear(); defaultColumns = new string[grdItems.Columns.Count]; int index = 0; foreach (Telerik.WinControls.UI.GridViewDataColumn column in grdItems.Columns) { ToolStripMenuItem _item = new ToolStripMenuItem(column.HeaderText); _item.Tag = column.Name; _item.Checked = column.IsVisible; _item.CheckOnClick = true; _item.Click += new EventHandler(tsmColumna_Click); tsmColumnas.DropDownItems.Add(_item); if (column.IsVisible) { defaultColumns[index] = column.Name; index += 1; } } ToolStripSeparator tsmSeparacion = new ToolStripSeparator(); tsmColumnas.DropDownItems.Add(tsmSeparacion); tsmTodos = new ToolStripMenuItem("Todos"); tsmTodos.Tag = "Todas"; tsmTodos.Checked = false; tsmTodos.CheckOnClick = true; tsmTodos.Click += new EventHandler(tsmTodos_Click); tsmColumnas.DropDownItems.Add(tsmTodos); Infrastructure.WinForms.Controls.GridAutoFit.Fit(grdItems); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, Infrastructure.Aspect.Constants.Mensajes.FormatDataGridView, ex); } }
private void FormatDataGrid() { try { Telerik.WinControls.UI.Localization.RadGridLocalizationProvider.CurrentProvider = new Infrastructure.WinForms.Controls.MySpanishRadGridLocalizationProvider(); this.grdItems.Columns.Clear(); this.grdItems.AllowAddNewRow = false; Telerik.WinControls.UI.GridViewCheckBoxColumn _Seleccionar = new Telerik.WinControls.UI.GridViewCheckBoxColumn(); _Seleccionar.Name = "Seleccionar"; _Seleccionar.HeaderText = "Seleccionar"; _Seleccionar.FieldName = "Seleccionar"; _Seleccionar.ReadOnly = false; this.grdItems.Columns.Add(_Seleccionar); this.grdItems.Columns["Seleccionar"].ReadOnly = false; this.grdItems.Columns.Add("TIPO_TDO", "Tipo", "TIPO_TDO"); this.grdItems.Columns.Add("CCCT_Serie", "Serie", "CCCT_Serie"); this.grdItems.Columns.Add("CCCT_Numero", "Número", "CCCT_Numero"); this.grdItems.Columns.Add("CCCT_FechaEmision", "Fecha Emisión", "CCCT_FechaEmision"); this.grdItems.Columns.Add("OV_OP", "OV / OP", "OV_OP"); this.grdItems.Columns.Add("FEmbarque", "Fecha de Embarque / Zarpe", "FEmbarque"); this.grdItems.Columns.Add("FechaETA", "Fecha ETA", "FechaETA"); this.grdItems.Columns.Add("NAVE_Nombre", "Nave Viaje", "NAVE_Nombre"); this.grdItems.Columns.Add("DOOV_MBL", "MBL", "DOOV_MBL"); this.grdItems.Columns.Add("DOOV_HBL", "HBL", "DOOV_HBL"); this.grdItems.Columns.Add("UNegocio", "Uni. Negocio", "UNegocio"); this.grdItems.Columns.Add("TIPO_MND", "Moneda", "TIPO_MND"); this.grdItems.Columns.Add("CCCT_Pendiente_Cargo", "Ingreso", "CCCT_Pendiente_Cargo"); this.grdItems.Columns.Add("CCCT_Pendiente_Abono", "Egreso", "CCCT_Pendiente_Abono"); Telerik.WinControls.UI.GridViewCheckBoxColumn _conciliado = new Telerik.WinControls.UI.GridViewCheckBoxColumn(); _conciliado.Name = "Conciliado"; _conciliado.HeaderText = "Conciliado"; _conciliado.FieldName = "Conciliado"; this.grdItems.Columns.Add(_conciliado); this.grdItems.Columns.Add("CONC_FecConciliacion", "Fec. Conciliación", "CONC_FecConciliacion"); this.grdItems.Columns.Add("CCCT_Codigo", "Transacción", "CCCT_Codigo"); this.grdItems.Columns.Add("ObservacionesConciliacion", "Observaciones", "ObservacionesConciliacion"); this.grdItems.Columns.Add("ConciliadoError", "Conciliacion", "ConciliadoError"); this.grdItems.Columns.Add("PagoMNDOriginal", "Monto Referencial", "PagoMNDOriginal"); this.grdItems.Columns["CCCT_FechaEmision"].FormatString = "{0:dd/MM/yyyy}"; this.grdItems.Columns["FEmbarque"].FormatString = "{0:dd/MM/yyyy}"; this.grdItems.Columns["FechaETA"].FormatString = "{0:dd/MM/yyyy}"; this.grdItems.Columns["CCCT_Pendiente_Cargo"].FormatString = "{0:#,###,##0.00}"; this.grdItems.Columns["CCCT_Pendiente_Abono"].FormatString = "{0:#,###,##0.00}"; this.grdItems.Columns["CCCT_Pendiente_Cargo"].TextAlignment = ContentAlignment.MiddleRight; this.grdItems.Columns["CCCT_Pendiente_Abono"].TextAlignment = ContentAlignment.MiddleRight; this.grdItems.Columns["PagoMNDOriginal"].TextAlignment = ContentAlignment.MiddleRight; this.grdItems.Columns["TIPO_TDO"].ReadOnly = true; this.grdItems.Columns["CCCT_Serie"].ReadOnly = true; this.grdItems.Columns["CCCT_Numero"].ReadOnly = true; this.grdItems.Columns["CCCT_FechaEmision"].ReadOnly = true; this.grdItems.Columns["OV_OP"].ReadOnly = true; this.grdItems.Columns["FEmbarque"].ReadOnly = true; this.grdItems.Columns["FechaETA"].ReadOnly = true; this.grdItems.Columns["NAVE_Nombre"].ReadOnly = true; this.grdItems.Columns["DOOV_MBL"].ReadOnly = true; this.grdItems.Columns["DOOV_HBL"].ReadOnly = true; this.grdItems.Columns["UNegocio"].ReadOnly = true; this.grdItems.Columns["TIPO_MND"].ReadOnly = true; this.grdItems.Columns["Conciliado"].ReadOnly = true; this.grdItems.Columns["Conciliado"].IsVisible = false; this.grdItems.Columns["CONC_FecConciliacion"].ReadOnly = true; this.grdItems.Columns["CONC_FecConciliacion"].IsVisible = false; this.grdItems.Columns["UNegocio"].IsVisible = false; this.grdItems.Columns["CCCT_Pendiente_Cargo"].ReadOnly = true; this.grdItems.Columns["CCCT_Pendiente_Abono"].IsVisible = true; this.grdItems.Columns["CCCT_Pendiente_Cargo"].ReadOnly = true; this.grdItems.Columns["CCCT_Pendiente_Abono"].IsVisible = true; this.grdItems.Columns["ObservacionesConciliacion"].ReadOnly = true; this.grdItems.Columns["ObservacionesConciliacion"].IsVisible = false; this.grdItems.Columns["ObservacionesConciliacion"].Width = 200; this.grdItems.Columns["ConciliadoError"].IsVisible = false; this.grdItems.Columns["PagoMNDOriginal"].ReadOnly = true; ConditionalFormattingObject c1 = new ConditionalFormattingObject("Orange, applied to entire row", ConditionTypes.Equal, "true", "", true); c1.RowBackColor = Color.DarkBlue; // FromArgb(255, 91, 15, 2); c1.CellBackColor = Color.DarkBlue; c1.RowForeColor = Color.White; grdItems.Columns["ConciliadoError"].ConditionalFormattingObjectList.Add(c1); Infrastructure.WinForms.Controls.GridAutoFit.Fit(grdItems); //grdItems.BestFitColumns(); grdItems.Columns["Seleccionar"].Width = 90; grdItems.Columns["Seleccionar"].ReadOnly = false; //grdItems.ReadOnly = false; //grdItems.ShowFilteringRow = false; //grdItems.EnableFiltering = false; //grdItems.MasterTemplate.EnableFiltering = false; //grdItems.EnableGrouping = false; //grdItems.MasterTemplate.EnableGrouping = false; //grdItems.EnableSorting = false; //grdItems.MasterTemplate.EnableCustomSorting = false; //grdItems.AllowColumnHeaderContextMenu = false; //grdItems.AllowCellContextMenu = false; } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, Infrastructure.Aspect.Constants.Mensajes.FormatDataGridView, ex); } }
private void FormatDataGrid() { try { Telerik.WinControls.UI.Localization.RadGridLocalizationProvider.CurrentProvider = new Infrastructure.WinForms.Controls.MySpanishRadGridLocalizationProvider(); this.grdItems.Columns.Clear(); this.grdItems.AllowAddNewRow = false; Telerik.WinControls.UI.GridViewCommandColumn commandColumn; commandColumn = new Telerik.WinControls.UI.GridViewCommandColumn(); commandColumn.Name = "Edit"; commandColumn.HeaderText = "Editar"; commandColumn.DefaultText = "Editar"; commandColumn.UseDefaultText = true; this.grdItems.Columns.Add(commandColumn); this.grdItems.Columns["Edit"].AllowSort = false; this.grdItems.Columns["Edit"].AllowFiltering = false; commandColumn = new Telerik.WinControls.UI.GridViewCommandColumn(); commandColumn.Name = "Delete"; commandColumn.HeaderText = "Eliminar"; commandColumn.DefaultText = "Eliminar"; commandColumn.UseDefaultText = true; this.grdItems.Columns.Add(commandColumn); this.grdItems.Columns["Delete"].AllowSort = false; this.grdItems.Columns["Delete"].AllowFiltering = false; this.grdItems.Columns.Add("ENTC_Codigo", "Código", "ENTC_Codigo"); this.grdItems.Columns.Add("Tipo_CodTDI", "Tipo Doc Iden", "Tipo_CodTDI"); //segun el tipo de entidad mostramos los campos this.grdItems.Columns.Add("ENTC_DocIden", "N.I.T.", "ENTC_DocIden"); this.grdItems.Columns.Add("ENTC_NomCompleto", "Nombre", "ENTC_NomCompleto"); //this.grdItems.Columns.Add("ENTC_Activo", "Activo", "ENTC_Activo"); Telerik.WinControls.UI.GridViewCheckBoxColumn checkColumn; checkColumn = new Telerik.WinControls.UI.GridViewCheckBoxColumn(); checkColumn.Name = "ENTC_Activo"; checkColumn.FieldName = "ENTC_Activo"; checkColumn.HeaderText = "Activo"; checkColumn.ReadOnly = true; this.grdItems.Columns.Add(checkColumn); this.grdItems.Columns.Add("ENTC_EMail", "Correo", "ENTC_EMail"); this.grdItems.Columns.Add("ENTC_EmailReceptorFE", "Correo Factura Electrónica", "ENTC_EmailReceptorFE"); this.grdItems.Columns.Add("ENTC_Telef1", "Tel. Fijo", "ENTC_Telef1"); this.grdItems.Columns.Add("ENTC_Telef2", "Tel. Movil", "ENTC_Telef2"); switch (Presenter.tipe_Codigo) { case Delfin.Controls.EntidadClear.TIPE_Cliente: //this.grdItems.Columns.Add("ENTC_Prospecto", "Prospecto", "ENTC_Prospecto"); checkColumn = new Telerik.WinControls.UI.GridViewCheckBoxColumn(); checkColumn.Name = "ENTC_Prospecto"; checkColumn.FieldName = "ENTC_Prospecto"; checkColumn.HeaderText = "Prospecto"; checkColumn.ReadOnly = true; this.grdItems.Columns.Add(checkColumn); this.grdItems.Columns.Add("TIPO_HOL", "Holding", "TIPO_HOL"); this.grdItems.Columns.Add("ENTC_FechaCredito", "Fecha Credito", "ENTC_FechaCredito"); this.grdItems.Columns.Add("ENTC_DiasCredito", "Dias Credito", "ENTC_DiasCredito"); this.grdItems.Columns["ENTC_FechaCredito"].FormatString = "{0:dd/MM/yyyy}"; this.grdItems.Columns.Add("Limitecredito", "Límite de Crédito", "Limitecredito"); break; case Delfin.Controls.EntidadClear.TIPE_Proveedor: break; case Delfin.Controls.EntidadClear.TIPE_Ejecutivo: this.grdItems.Columns.Add("ENTC_FecIng", "Fec. Ingreso", "ENTC_FecIng"); this.grdItems.Columns.Add("ENTC_Area", "Area", "ENTC_Area"); this.grdItems.Columns.Add("ENTC_Cargo", "Cargo", "ENTC_Cargo"); break; case Delfin.Controls.EntidadClear.TIPE_CustomerService: this.grdItems.Columns.Add("ENTC_FecIng", "Fec. Ingreso", "ENTC_FecIng"); this.grdItems.Columns.Add("ENTC_Area", "Area", "ENTC_Area"); this.grdItems.Columns.Add("ENTC_Cargo", "Cargo", "ENTC_Cargo"); break; case Delfin.Controls.EntidadClear.TIPE_Transportista: break; case Delfin.Controls.EntidadClear.TIPE_Agente: break; case Delfin.Controls.EntidadClear.TIPE_Broker: this.grdItems.Columns.Add("ENTC_FecIng", "Fec. Ingreso", "ENTC_FecIng"); break; case Delfin.Controls.EntidadClear.TIPE_AgenteCarga: break; case Delfin.Controls.EntidadClear.TIPE_Contacto: this.grdItems.Columns.Add("ENTC_Area", "Area", "ENTC_Area"); this.grdItems.Columns.Add("ENTC_Cargo", "Cargo", "ENTC_Cargo"); break; default: break; } this.grdItems.Columns.Add("ENTC_CodSAP_C", "Cliente SAP", "ENTC_CodSAP_C"); this.grdItems.Columns.Add("ENTC_CodSAP_P", "Proveedor SAP", "ENTC_CodSAP_P"); this.grdItems.Columns.Add("ENTC_FecActSAP", "Sincronización SAP", "ENTC_FecActSAP"); //this.grdItems.Columns.Add("ENTC_EstActSAP", "Creado por", "ENTC_EstActSAP"); this.grdItems.Columns.Add("AUDI_UsrCrea", "Creado por", "AUDI_UsrCrea"); this.grdItems.Columns.Add("AUDI_FecCrea", "Fecha crea", "AUDI_FecCrea"); this.grdItems.Columns.Add("AUDI_UsrMod", "Modificado por", "AUDI_UsrMod"); this.grdItems.Columns.Add("AUDI_FecMod", "Fecha mod.", "AUDI_FecMod"); grdItems.BestFitColumns(); tsmColumnas.DropDownItems.Clear(); defaultColumns = new string[grdItems.Columns.Count]; int index = 0; foreach (Telerik.WinControls.UI.GridViewDataColumn column in grdItems.Columns) { ToolStripMenuItem _item = new ToolStripMenuItem(column.HeaderText); _item.Tag = column.Name; _item.Checked = column.IsVisible; _item.CheckOnClick = true; _item.Click += new EventHandler(tsmColumna_Click); tsmColumnas.DropDownItems.Add(_item); if (column.IsVisible) { defaultColumns[index] = column.Name; index += 1; } } ToolStripSeparator tsmSeparacion = new ToolStripSeparator(); tsmColumnas.DropDownItems.Add(tsmSeparacion); tsmTodos = new ToolStripMenuItem("Todos"); tsmTodos.Tag = "Todas"; tsmTodos.Checked = false; tsmTodos.CheckOnClick = true; tsmTodos.Click += new EventHandler(tsmTodos_Click); tsmColumnas.DropDownItems.Add(tsmTodos); Infrastructure.WinForms.Controls.GridAutoFit.Fit(grdItems); } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, Infrastructure.Aspect.Constants.Mensajes.FormatDataGridView, ex); } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn1 = new Telerik.WinControls.UI.GridViewDecimalColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn1 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn2 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn3 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn4 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewDateTimeColumn gridViewDateTimeColumn1 = new Telerik.WinControls.UI.GridViewDateTimeColumn(); Telerik.WinControls.UI.GridViewDateTimeColumn gridViewDateTimeColumn2 = new Telerik.WinControls.UI.GridViewDateTimeColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn5 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn6 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn7 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn8 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn9 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn10 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn11 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewImageColumn gridViewImageColumn1 = new Telerik.WinControls.UI.GridViewImageColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn12 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn2 = new Telerik.WinControls.UI.GridViewDecimalColumn(); Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn3 = new Telerik.WinControls.UI.GridViewDecimalColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn13 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn4 = new Telerik.WinControls.UI.GridViewDecimalColumn(); Telerik.WinControls.UI.GridViewDateTimeColumn gridViewDateTimeColumn3 = new Telerik.WinControls.UI.GridViewDateTimeColumn(); Telerik.WinControls.UI.GridViewDateTimeColumn gridViewDateTimeColumn4 = new Telerik.WinControls.UI.GridViewDateTimeColumn(); Telerik.WinControls.UI.GridViewDateTimeColumn gridViewDateTimeColumn5 = new Telerik.WinControls.UI.GridViewDateTimeColumn(); Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn5 = new Telerik.WinControls.UI.GridViewDecimalColumn(); Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn6 = new Telerik.WinControls.UI.GridViewDecimalColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn14 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn15 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn16 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn17 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn18 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn19 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn7 = new Telerik.WinControls.UI.GridViewDecimalColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn20 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn8 = new Telerik.WinControls.UI.GridViewDecimalColumn(); Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn9 = new Telerik.WinControls.UI.GridViewDecimalColumn(); Telerik.WinControls.UI.GridViewTextBoxColumn gridViewTextBoxColumn21 = new Telerik.WinControls.UI.GridViewTextBoxColumn(); Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn10 = new Telerik.WinControls.UI.GridViewDecimalColumn(); Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn11 = new Telerik.WinControls.UI.GridViewDecimalColumn(); Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn12 = new Telerik.WinControls.UI.GridViewDecimalColumn(); Telerik.WinControls.UI.GridViewDecimalColumn gridViewDecimalColumn13 = new Telerik.WinControls.UI.GridViewDecimalColumn(); Telerik.WinControls.UI.GridViewCheckBoxColumn gridViewCheckBoxColumn1 = new Telerik.WinControls.UI.GridViewCheckBoxColumn(); this.productsBindingSource = new System.Windows.Forms.BindingSource(this.components); this.northwindDataSet = new Telerik.Examples.WinControls.DataSources.NorthwindDataSet(); this.radGridView2 = new Telerik.WinControls.UI.RadGridView(); this.employeesBindingSource = new System.Windows.Forms.BindingSource(this.components); this.radGridView3 = new Telerik.WinControls.UI.RadGridView(); this.ordersBindingSource = new System.Windows.Forms.BindingSource(this.components); this.radGroupBox1 = new Telerik.WinControls.UI.RadGroupBox(); this.radButtonClear = new Telerik.WinControls.UI.RadButton(); this.textBox1 = new Telerik.WinControls.UI.RadTextBox(); this.productsTableAdapter = new Telerik.Examples.WinControls.DataSources.NorthwindDataSetTableAdapters.ProductsTableAdapter(); this.employeesTableAdapter = new Telerik.Examples.WinControls.DataSources.NorthwindDataSetTableAdapters.EmployeesTableAdapter(); this.ordersTableAdapter = new Telerik.Examples.WinControls.DataSources.NorthwindDataSetTableAdapters.OrdersTableAdapter(); this.radPageView1 = new Telerik.WinControls.UI.RadPageView(); this.radPageViewPage1 = new Telerik.WinControls.UI.RadPageViewPage(); this.radGridView1 = new Telerik.WinControls.UI.RadGridView(); this.radPageViewPage2 = new Telerik.WinControls.UI.RadPageViewPage(); this.radPageViewPage3 = new Telerik.WinControls.UI.RadPageViewPage(); this.radLabel1 = new Telerik.WinControls.UI.RadLabel(); this.dragModeCombo = new Telerik.WinControls.UI.RadDropDownList(); ((System.ComponentModel.ISupportInitialize)(this.settingsPanel)).BeginInit(); this.settingsPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.productsBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.northwindDataSet)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.radGridView2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.radGridView2.MasterTemplate)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.employeesBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.radGridView3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.radGridView3.MasterTemplate)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ordersBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.radGroupBox1)).BeginInit(); this.radGroupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.radButtonClear)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.textBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.radPageView1)).BeginInit(); this.radPageView1.SuspendLayout(); this.radPageViewPage1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.radGridView1.MasterTemplate)).BeginInit(); this.radPageViewPage2.SuspendLayout(); this.radPageViewPage3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.radLabel1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dragModeCombo)).BeginInit(); this.SuspendLayout(); // // settingsPanel // this.settingsPanel.Controls.Add(this.dragModeCombo); this.settingsPanel.Controls.Add(this.radLabel1); this.settingsPanel.Controls.Add(this.radGroupBox1); this.settingsPanel.ForeColor = System.Drawing.Color.Black; this.settingsPanel.Location = new System.Drawing.Point(1093, 1); // // // this.settingsPanel.RootElement.ForeColor = System.Drawing.Color.Black; this.settingsPanel.Size = new System.Drawing.Size(200, 549); this.settingsPanel.ThemeName = "ControlDefault"; this.settingsPanel.Controls.SetChildIndex(this.radGroupBox1, 0); this.settingsPanel.Controls.SetChildIndex(this.radLabel1, 0); this.settingsPanel.Controls.SetChildIndex(this.dragModeCombo, 0); // // productsBindingSource // this.productsBindingSource.DataMember = "Products"; this.productsBindingSource.DataSource = this.northwindDataSet; // // northwindDataSet // this.northwindDataSet.DataSetName = "NorthwindDataSet"; this.northwindDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; // // radGridView2 // this.radGridView2.BackColor = System.Drawing.Color.Transparent; this.radGridView2.Cursor = System.Windows.Forms.Cursors.Default; this.radGridView2.Dock = System.Windows.Forms.DockStyle.Fill; this.radGridView2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.radGridView2.ForeColor = System.Drawing.Color.Black; this.radGridView2.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.radGridView2.Location = new System.Drawing.Point(0, 0); // // // gridViewDecimalColumn1.DataType = typeof(int); gridViewDecimalColumn1.FieldName = "EmployeeID"; gridViewDecimalColumn1.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDecimalColumn1.HeaderText = "EmployeeID"; gridViewDecimalColumn1.IsAutoGenerated = true; gridViewDecimalColumn1.IsVisible = false; gridViewDecimalColumn1.Name = "EmployeeID"; gridViewDecimalColumn1.TextAlignment = System.Drawing.ContentAlignment.MiddleRight; gridViewTextBoxColumn1.FieldName = "LastName"; gridViewTextBoxColumn1.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn1.HeaderText = "LastName"; gridViewTextBoxColumn1.IsAutoGenerated = true; gridViewTextBoxColumn1.IsVisible = false; gridViewTextBoxColumn1.Name = "LastName"; gridViewTextBoxColumn2.FieldName = "FirstName"; gridViewTextBoxColumn2.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn2.HeaderText = "FirstName"; gridViewTextBoxColumn2.IsAutoGenerated = true; gridViewTextBoxColumn2.Name = "FirstName"; gridViewTextBoxColumn3.FieldName = "Title"; gridViewTextBoxColumn3.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn3.HeaderText = "Title"; gridViewTextBoxColumn3.IsAutoGenerated = true; gridViewTextBoxColumn3.Name = "Title"; gridViewTextBoxColumn4.FieldName = "TitleOfCourtesy"; gridViewTextBoxColumn4.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn4.HeaderText = "TitleOfCourtesy"; gridViewTextBoxColumn4.IsAutoGenerated = true; gridViewTextBoxColumn4.IsVisible = false; gridViewTextBoxColumn4.Name = "TitleOfCourtesy"; gridViewDateTimeColumn1.DataType = typeof(System.DateTime); gridViewDateTimeColumn1.FieldName = "BirthDate"; gridViewDateTimeColumn1.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDateTimeColumn1.HeaderText = "BirthDate"; gridViewDateTimeColumn1.IsAutoGenerated = true; gridViewDateTimeColumn1.IsVisible = false; gridViewDateTimeColumn1.Name = "BirthDate"; gridViewDateTimeColumn2.DataType = typeof(System.DateTime); gridViewDateTimeColumn2.FieldName = "HireDate"; gridViewDateTimeColumn2.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDateTimeColumn2.HeaderText = "HireDate"; gridViewDateTimeColumn2.IsAutoGenerated = true; gridViewDateTimeColumn2.IsVisible = false; gridViewDateTimeColumn2.Name = "HireDate"; gridViewTextBoxColumn5.FieldName = "Address"; gridViewTextBoxColumn5.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn5.HeaderText = "Address"; gridViewTextBoxColumn5.IsAutoGenerated = true; gridViewTextBoxColumn5.Name = "Address"; gridViewTextBoxColumn6.FieldName = "City"; gridViewTextBoxColumn6.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn6.HeaderText = "City"; gridViewTextBoxColumn6.IsAutoGenerated = true; gridViewTextBoxColumn6.IsVisible = false; gridViewTextBoxColumn6.Name = "City"; gridViewTextBoxColumn7.FieldName = "Region"; gridViewTextBoxColumn7.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn7.HeaderText = "Region"; gridViewTextBoxColumn7.IsAutoGenerated = true; gridViewTextBoxColumn7.IsVisible = false; gridViewTextBoxColumn7.Name = "Region"; gridViewTextBoxColumn8.FieldName = "PostalCode"; gridViewTextBoxColumn8.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn8.HeaderText = "PostalCode"; gridViewTextBoxColumn8.IsAutoGenerated = true; gridViewTextBoxColumn8.IsVisible = false; gridViewTextBoxColumn8.Name = "PostalCode"; gridViewTextBoxColumn9.FieldName = "Country"; gridViewTextBoxColumn9.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn9.HeaderText = "Country"; gridViewTextBoxColumn9.IsAutoGenerated = true; gridViewTextBoxColumn9.IsVisible = false; gridViewTextBoxColumn9.Name = "Country"; gridViewTextBoxColumn10.FieldName = "HomePhone"; gridViewTextBoxColumn10.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn10.HeaderText = "HomePhone"; gridViewTextBoxColumn10.IsAutoGenerated = true; gridViewTextBoxColumn10.IsVisible = false; gridViewTextBoxColumn10.Name = "HomePhone"; gridViewTextBoxColumn11.FieldName = "Extension"; gridViewTextBoxColumn11.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn11.HeaderText = "Extension"; gridViewTextBoxColumn11.IsAutoGenerated = true; gridViewTextBoxColumn11.IsVisible = false; gridViewTextBoxColumn11.Name = "Extension"; gridViewImageColumn1.DataType = typeof(byte[]); gridViewImageColumn1.FieldName = "Photo"; gridViewImageColumn1.FormatInfo = new System.Globalization.CultureInfo(""); gridViewImageColumn1.HeaderText = "Photo"; gridViewImageColumn1.IsAutoGenerated = true; gridViewImageColumn1.IsVisible = false; gridViewImageColumn1.Name = "Photo"; gridViewTextBoxColumn12.FieldName = "Notes"; gridViewTextBoxColumn12.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn12.HeaderText = "Notes"; gridViewTextBoxColumn12.IsAutoGenerated = true; gridViewTextBoxColumn12.IsVisible = false; gridViewTextBoxColumn12.Name = "Notes"; gridViewDecimalColumn2.DataType = typeof(int); gridViewDecimalColumn2.FieldName = "ReportsTo"; gridViewDecimalColumn2.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDecimalColumn2.HeaderText = "ReportsTo"; gridViewDecimalColumn2.IsAutoGenerated = true; gridViewDecimalColumn2.IsVisible = false; gridViewDecimalColumn2.Name = "ReportsTo"; gridViewDecimalColumn2.TextAlignment = System.Drawing.ContentAlignment.MiddleRight; this.radGridView2.MasterTemplate.Columns.AddRange(new Telerik.WinControls.UI.GridViewDataColumn[] { gridViewDecimalColumn1, gridViewTextBoxColumn1, gridViewTextBoxColumn2, gridViewTextBoxColumn3, gridViewTextBoxColumn4, gridViewDateTimeColumn1, gridViewDateTimeColumn2, gridViewTextBoxColumn5, gridViewTextBoxColumn6, gridViewTextBoxColumn7, gridViewTextBoxColumn8, gridViewTextBoxColumn9, gridViewTextBoxColumn10, gridViewTextBoxColumn11, gridViewImageColumn1, gridViewTextBoxColumn12, gridViewDecimalColumn2 }); this.radGridView2.MasterTemplate.DataSource = this.employeesBindingSource; this.radGridView2.MasterTemplate.EnableGrouping = false; this.radGridView2.Name = "radGridView2"; this.radGridView2.Padding = new System.Windows.Forms.Padding(0, 0, 0, 1); this.radGridView2.RightToLeft = System.Windows.Forms.RightToLeft.No; // // // this.radGridView2.RootElement.ForeColor = System.Drawing.Color.Black; this.radGridView2.RootElement.Padding = new System.Windows.Forms.Padding(0, 0, 0, 1); this.radGridView2.ShowGroupPanel = false; this.radGridView2.Size = new System.Drawing.Size(607, 418); this.radGridView2.TabIndex = 0; this.radGridView2.Text = "radGridViewPreview"; // // employeesBindingSource // this.employeesBindingSource.DataMember = "Employees"; this.employeesBindingSource.DataSource = this.northwindDataSet; // // radGridView3 // this.radGridView3.BackColor = System.Drawing.Color.Transparent; this.radGridView3.Cursor = System.Windows.Forms.Cursors.Default; this.radGridView3.Dock = System.Windows.Forms.DockStyle.Fill; this.radGridView3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.radGridView3.ForeColor = System.Drawing.Color.Black; this.radGridView3.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.radGridView3.Location = new System.Drawing.Point(0, 0); // // // gridViewDecimalColumn3.DataType = typeof(int); gridViewDecimalColumn3.FieldName = "OrderID"; gridViewDecimalColumn3.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDecimalColumn3.HeaderText = "OrderID"; gridViewDecimalColumn3.IsAutoGenerated = true; gridViewDecimalColumn3.Name = "OrderID"; gridViewDecimalColumn3.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; gridViewTextBoxColumn13.FieldName = "CustomerID"; gridViewTextBoxColumn13.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn13.HeaderText = "CustomerID"; gridViewTextBoxColumn13.IsAutoGenerated = true; gridViewTextBoxColumn13.IsVisible = false; gridViewTextBoxColumn13.Name = "CustomerID"; gridViewDecimalColumn4.DataType = typeof(int); gridViewDecimalColumn4.FieldName = "EmployeeID"; gridViewDecimalColumn4.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDecimalColumn4.HeaderText = "EmployeeID"; gridViewDecimalColumn4.IsAutoGenerated = true; gridViewDecimalColumn4.IsVisible = false; gridViewDecimalColumn4.Name = "EmployeeID"; gridViewDecimalColumn4.TextAlignment = System.Drawing.ContentAlignment.MiddleRight; gridViewDateTimeColumn3.DataType = typeof(System.DateTime); gridViewDateTimeColumn3.FieldName = "OrderDate"; gridViewDateTimeColumn3.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDateTimeColumn3.HeaderText = "OrderDate"; gridViewDateTimeColumn3.IsAutoGenerated = true; gridViewDateTimeColumn3.Name = "OrderDate"; gridViewDateTimeColumn4.DataType = typeof(System.DateTime); gridViewDateTimeColumn4.FieldName = "RequiredDate"; gridViewDateTimeColumn4.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDateTimeColumn4.HeaderText = "RequiredDate"; gridViewDateTimeColumn4.IsAutoGenerated = true; gridViewDateTimeColumn4.IsVisible = false; gridViewDateTimeColumn4.Name = "RequiredDate"; gridViewDateTimeColumn5.DataType = typeof(System.DateTime); gridViewDateTimeColumn5.FieldName = "ShippedDate"; gridViewDateTimeColumn5.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDateTimeColumn5.HeaderText = "ShippedDate"; gridViewDateTimeColumn5.IsAutoGenerated = true; gridViewDateTimeColumn5.IsVisible = false; gridViewDateTimeColumn5.Name = "ShippedDate"; gridViewDecimalColumn5.DataType = typeof(int); gridViewDecimalColumn5.FieldName = "ShipVia"; gridViewDecimalColumn5.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDecimalColumn5.HeaderText = "ShipVia"; gridViewDecimalColumn5.IsAutoGenerated = true; gridViewDecimalColumn5.IsVisible = false; gridViewDecimalColumn5.Name = "ShipVia"; gridViewDecimalColumn5.TextAlignment = System.Drawing.ContentAlignment.MiddleRight; gridViewDecimalColumn6.DataType = typeof(decimal); gridViewDecimalColumn6.FieldName = "Freight"; gridViewDecimalColumn6.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDecimalColumn6.HeaderText = "Freight"; gridViewDecimalColumn6.IsAutoGenerated = true; gridViewDecimalColumn6.IsVisible = false; gridViewDecimalColumn6.Name = "Freight"; gridViewDecimalColumn6.TextAlignment = System.Drawing.ContentAlignment.MiddleRight; gridViewTextBoxColumn14.FieldName = "ShipName"; gridViewTextBoxColumn14.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn14.HeaderText = "ShipName"; gridViewTextBoxColumn14.IsAutoGenerated = true; gridViewTextBoxColumn14.Name = "ShipName"; gridViewTextBoxColumn15.FieldName = "ShipAddress"; gridViewTextBoxColumn15.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn15.HeaderText = "ShipAddress"; gridViewTextBoxColumn15.IsAutoGenerated = true; gridViewTextBoxColumn15.IsVisible = false; gridViewTextBoxColumn15.Name = "ShipAddress"; gridViewTextBoxColumn16.FieldName = "ShipCity"; gridViewTextBoxColumn16.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn16.HeaderText = "ShipCity"; gridViewTextBoxColumn16.IsAutoGenerated = true; gridViewTextBoxColumn16.IsVisible = false; gridViewTextBoxColumn16.Name = "ShipCity"; gridViewTextBoxColumn17.FieldName = "ShipRegion"; gridViewTextBoxColumn17.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn17.HeaderText = "ShipRegion"; gridViewTextBoxColumn17.IsAutoGenerated = true; gridViewTextBoxColumn17.IsVisible = false; gridViewTextBoxColumn17.Name = "ShipRegion"; gridViewTextBoxColumn18.FieldName = "ShipPostalCode"; gridViewTextBoxColumn18.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn18.HeaderText = "ShipPostalCode"; gridViewTextBoxColumn18.IsAutoGenerated = true; gridViewTextBoxColumn18.IsVisible = false; gridViewTextBoxColumn18.Name = "ShipPostalCode"; gridViewTextBoxColumn19.FieldName = "ShipCountry"; gridViewTextBoxColumn19.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn19.HeaderText = "ShipCountry"; gridViewTextBoxColumn19.IsAutoGenerated = true; gridViewTextBoxColumn19.IsVisible = false; gridViewTextBoxColumn19.Name = "ShipCountry"; this.radGridView3.MasterTemplate.Columns.AddRange(new Telerik.WinControls.UI.GridViewDataColumn[] { gridViewDecimalColumn3, gridViewTextBoxColumn13, gridViewDecimalColumn4, gridViewDateTimeColumn3, gridViewDateTimeColumn4, gridViewDateTimeColumn5, gridViewDecimalColumn5, gridViewDecimalColumn6, gridViewTextBoxColumn14, gridViewTextBoxColumn15, gridViewTextBoxColumn16, gridViewTextBoxColumn17, gridViewTextBoxColumn18, gridViewTextBoxColumn19 }); this.radGridView3.MasterTemplate.DataSource = this.ordersBindingSource; this.radGridView3.MasterTemplate.EnableGrouping = false; this.radGridView3.Name = "radGridView3"; this.radGridView3.Padding = new System.Windows.Forms.Padding(0, 0, 0, 1); this.radGridView3.RightToLeft = System.Windows.Forms.RightToLeft.No; // // // this.radGridView3.RootElement.ForeColor = System.Drawing.Color.Black; this.radGridView3.RootElement.Padding = new System.Windows.Forms.Padding(0, 0, 0, 1); this.radGridView3.ShowGroupPanel = false; this.radGridView3.Size = new System.Drawing.Size(607, 418); this.radGridView3.TabIndex = 1; this.radGridView3.Text = "radGridViewPreview"; // // ordersBindingSource // this.ordersBindingSource.DataMember = "Orders"; this.ordersBindingSource.DataSource = this.northwindDataSet; // // radGroupBox1 // this.radGroupBox1.Anchor = System.Windows.Forms.AnchorStyles.Top; this.radGroupBox1.Controls.Add(this.radButtonClear); this.radGroupBox1.Controls.Add(this.textBox1); this.radGroupBox1.FooterImageIndex = -1; this.radGroupBox1.FooterImageKey = ""; this.radGroupBox1.FooterText = ""; this.radGroupBox1.ForeColor = System.Drawing.Color.Black; this.radGroupBox1.HeaderImageIndex = -1; this.radGroupBox1.HeaderImageKey = ""; this.radGroupBox1.HeaderMargin = new System.Windows.Forms.Padding(0); this.radGroupBox1.HeaderText = "Events"; this.radGroupBox1.Location = new System.Drawing.Point(10, 91); this.radGroupBox1.Name = "radGroupBox1"; this.radGroupBox1.Padding = new System.Windows.Forms.Padding(10, 20, 10, 10); // // // this.radGroupBox1.RootElement.ForeColor = System.Drawing.Color.Black; this.radGroupBox1.RootElement.Padding = new System.Windows.Forms.Padding(10, 20, 10, 10); this.radGroupBox1.Size = new System.Drawing.Size(180, 235); this.radGroupBox1.TabIndex = 9; this.radGroupBox1.Text = "Events"; // // radButtonClear // this.radButtonClear.Location = new System.Drawing.Point(23, 197); this.radButtonClear.Name = "radButtonClear"; this.radButtonClear.Size = new System.Drawing.Size(134, 23); this.radButtonClear.TabIndex = 10; this.radButtonClear.Text = "Clear"; this.radButtonClear.Click += new System.EventHandler(this.radButtonClear_Click); // // textBox1 // this.textBox1.ForeColor = System.Drawing.Color.Black; this.textBox1.Location = new System.Drawing.Point(23, 22); this.textBox1.Multiline = true; this.textBox1.Name = "textBox1"; // // // this.textBox1.RootElement.ForeColor = System.Drawing.Color.Black; this.textBox1.RootElement.StretchVertically = true; this.textBox1.Size = new System.Drawing.Size(134, 169); this.textBox1.TabIndex = 0; this.textBox1.TabStop = false; this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged); // // productsTableAdapter // this.productsTableAdapter.ClearBeforeFill = true; // // employeesTableAdapter // this.employeesTableAdapter.ClearBeforeFill = true; // // ordersTableAdapter // this.ordersTableAdapter.ClearBeforeFill = true; // // radPageView1 // this.radPageView1.Anchor = System.Windows.Forms.AnchorStyles.None; this.radPageView1.Controls.Add(this.radPageViewPage1); this.radPageView1.Controls.Add(this.radPageViewPage2); this.radPageView1.Controls.Add(this.radPageViewPage3); this.radPageView1.Location = new System.Drawing.Point(287, 55); this.radPageView1.Name = "radPageView1"; this.radPageView1.SelectedPage = this.radPageViewPage1; this.radPageView1.Size = new System.Drawing.Size(628, 466); this.radPageView1.TabIndex = 9; this.radPageView1.Text = "radPageView1"; // // radPageViewPage1 // this.radPageViewPage1.Controls.Add(this.radGridView1); this.radPageViewPage1.Location = new System.Drawing.Point(10, 37); this.radPageViewPage1.Name = "radPageViewPage1"; this.radPageViewPage1.Size = new System.Drawing.Size(607, 418); this.radPageViewPage1.Text = "Products"; // // radGridView1 // this.radGridView1.BackColor = System.Drawing.Color.Transparent; this.radGridView1.Cursor = System.Windows.Forms.Cursors.Default; this.radGridView1.Dock = System.Windows.Forms.DockStyle.Fill; this.radGridView1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.radGridView1.ForeColor = System.Drawing.Color.Black; this.radGridView1.ImeMode = System.Windows.Forms.ImeMode.NoControl; this.radGridView1.Location = new System.Drawing.Point(0, 0); // // // gridViewDecimalColumn7.DataType = typeof(int); gridViewDecimalColumn7.FieldName = "ProductID"; gridViewDecimalColumn7.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDecimalColumn7.HeaderText = "ProductID"; gridViewDecimalColumn7.IsAutoGenerated = true; gridViewDecimalColumn7.IsVisible = false; gridViewDecimalColumn7.Name = "ProductID"; gridViewDecimalColumn7.TextAlignment = System.Drawing.ContentAlignment.MiddleRight; gridViewTextBoxColumn20.FieldName = "ProductName"; gridViewTextBoxColumn20.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn20.HeaderText = "ProductName"; gridViewTextBoxColumn20.IsAutoGenerated = true; gridViewTextBoxColumn20.Name = "ProductName"; gridViewDecimalColumn8.DataType = typeof(int); gridViewDecimalColumn8.FieldName = "SupplierID"; gridViewDecimalColumn8.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDecimalColumn8.HeaderText = "SupplierID"; gridViewDecimalColumn8.IsAutoGenerated = true; gridViewDecimalColumn8.IsVisible = false; gridViewDecimalColumn8.Name = "SupplierID"; gridViewDecimalColumn8.TextAlignment = System.Drawing.ContentAlignment.MiddleRight; gridViewDecimalColumn9.DataType = typeof(int); gridViewDecimalColumn9.FieldName = "CategoryID"; gridViewDecimalColumn9.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDecimalColumn9.HeaderText = "CategoryID"; gridViewDecimalColumn9.IsAutoGenerated = true; gridViewDecimalColumn9.IsVisible = false; gridViewDecimalColumn9.Name = "CategoryID"; gridViewDecimalColumn9.TextAlignment = System.Drawing.ContentAlignment.MiddleRight; gridViewTextBoxColumn21.FieldName = "QuantityPerUnit"; gridViewTextBoxColumn21.FormatInfo = new System.Globalization.CultureInfo(""); gridViewTextBoxColumn21.HeaderText = "QuantityPerUnit"; gridViewTextBoxColumn21.IsAutoGenerated = true; gridViewTextBoxColumn21.Name = "QuantityPerUnit"; gridViewDecimalColumn10.DataType = typeof(decimal); gridViewDecimalColumn10.FieldName = "UnitPrice"; gridViewDecimalColumn10.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDecimalColumn10.HeaderText = "UnitPrice"; gridViewDecimalColumn10.IsAutoGenerated = true; gridViewDecimalColumn10.Name = "UnitPrice"; gridViewDecimalColumn10.TextAlignment = System.Drawing.ContentAlignment.MiddleRight; gridViewDecimalColumn11.DataType = typeof(short); gridViewDecimalColumn11.FieldName = "UnitsInStock"; gridViewDecimalColumn11.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDecimalColumn11.HeaderText = "UnitsInStock"; gridViewDecimalColumn11.IsAutoGenerated = true; gridViewDecimalColumn11.IsVisible = false; gridViewDecimalColumn11.Name = "UnitsInStock"; gridViewDecimalColumn11.TextAlignment = System.Drawing.ContentAlignment.MiddleRight; gridViewDecimalColumn12.DataType = typeof(short); gridViewDecimalColumn12.FieldName = "UnitsOnOrder"; gridViewDecimalColumn12.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDecimalColumn12.HeaderText = "UnitsOnOrder"; gridViewDecimalColumn12.IsAutoGenerated = true; gridViewDecimalColumn12.IsVisible = false; gridViewDecimalColumn12.Name = "UnitsOnOrder"; gridViewDecimalColumn12.TextAlignment = System.Drawing.ContentAlignment.MiddleRight; gridViewDecimalColumn13.DataType = typeof(short); gridViewDecimalColumn13.FieldName = "ReorderLevel"; gridViewDecimalColumn13.FormatInfo = new System.Globalization.CultureInfo(""); gridViewDecimalColumn13.HeaderText = "ReorderLevel"; gridViewDecimalColumn13.IsAutoGenerated = true; gridViewDecimalColumn13.IsVisible = false; gridViewDecimalColumn13.Name = "ReorderLevel"; gridViewDecimalColumn13.TextAlignment = System.Drawing.ContentAlignment.MiddleRight; gridViewCheckBoxColumn1.DataType = typeof(bool); gridViewCheckBoxColumn1.FieldName = "Discontinued"; gridViewCheckBoxColumn1.FormatInfo = new System.Globalization.CultureInfo(""); gridViewCheckBoxColumn1.HeaderText = "Discontinued"; gridViewCheckBoxColumn1.IsAutoGenerated = true; gridViewCheckBoxColumn1.IsVisible = false; gridViewCheckBoxColumn1.Name = "Discontinued"; this.radGridView1.MasterTemplate.Columns.AddRange(new Telerik.WinControls.UI.GridViewDataColumn[] { gridViewDecimalColumn7, gridViewTextBoxColumn20, gridViewDecimalColumn8, gridViewDecimalColumn9, gridViewTextBoxColumn21, gridViewDecimalColumn10, gridViewDecimalColumn11, gridViewDecimalColumn12, gridViewDecimalColumn13, gridViewCheckBoxColumn1 }); this.radGridView1.MasterTemplate.DataSource = this.productsBindingSource; this.radGridView1.MasterTemplate.EnableGrouping = false; this.radGridView1.Name = "radGridView1"; this.radGridView1.Padding = new System.Windows.Forms.Padding(0, 0, 0, 1); this.radGridView1.RightToLeft = System.Windows.Forms.RightToLeft.No; // // // this.radGridView1.RootElement.ForeColor = System.Drawing.Color.Black; this.radGridView1.RootElement.Padding = new System.Windows.Forms.Padding(0, 0, 0, 1); this.radGridView1.ShowGroupPanel = false; this.radGridView1.Size = new System.Drawing.Size(607, 418); this.radGridView1.TabIndex = 0; this.radGridView1.Text = "radGridViewPreview"; // // radPageViewPage2 // this.radPageViewPage2.Controls.Add(this.radGridView2); this.radPageViewPage2.Location = new System.Drawing.Point(10, 37); this.radPageViewPage2.Name = "radPageViewPage2"; this.radPageViewPage2.Size = new System.Drawing.Size(607, 418); this.radPageViewPage2.Text = "Company Info"; // // radPageViewPage3 // this.radPageViewPage3.Controls.Add(this.radGridView3); this.radPageViewPage3.Location = new System.Drawing.Point(10, 37); this.radPageViewPage3.Name = "radPageViewPage3"; this.radPageViewPage3.Size = new System.Drawing.Size(607, 418); this.radPageViewPage3.Text = "Orders"; // // radLabel1 // this.radLabel1.Anchor = System.Windows.Forms.AnchorStyles.Top; this.radLabel1.Location = new System.Drawing.Point(10, 37); this.radLabel1.Name = "radLabel1"; this.radLabel1.Size = new System.Drawing.Size(90, 16); this.radLabel1.TabIndex = 10; this.radLabel1.Text = "Item Drag Mode:"; // // dragModeCombo // this.dragModeCombo.Anchor = System.Windows.Forms.AnchorStyles.Top; this.dragModeCombo.AutoCompleteDataSource = null; this.dragModeCombo.DropDownAnimationEnabled = false; this.dragModeCombo.DropDownAnimationFrames = 1; this.dragModeCombo.Location = new System.Drawing.Point(10, 59); this.dragModeCombo.Name = "dragModeCombo"; this.dragModeCombo.Size = new System.Drawing.Size(180, 20); this.dragModeCombo.TabIndex = 11; this.dragModeCombo.TabStop = false; this.dragModeCombo.Text = "radDropDownList1"; this.dragModeCombo.SelectedIndexChanged += new Telerik.WinControls.UI.Data.PositionChangedEventHandler(this.dragModeCombo_SelectedIndexChanged); // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.radPageView1); this.Name = "Form1"; this.Size = new System.Drawing.Size(1294, 551); this.Controls.SetChildIndex(this.radPageView1, 0); this.Controls.SetChildIndex(this.settingsPanel, 0); ((System.ComponentModel.ISupportInitialize)(this.settingsPanel)).EndInit(); this.settingsPanel.ResumeLayout(false); this.settingsPanel.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.productsBindingSource)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.northwindDataSet)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.radGridView2.MasterTemplate)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.radGridView2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.employeesBindingSource)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.radGridView3.MasterTemplate)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.radGridView3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ordersBindingSource)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.radGroupBox1)).EndInit(); this.radGroupBox1.ResumeLayout(false); this.radGroupBox1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.radButtonClear)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.textBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.radPageView1)).EndInit(); this.radPageView1.ResumeLayout(false); this.radPageViewPage1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.radGridView1.MasterTemplate)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.radGridView1)).EndInit(); this.radPageViewPage2.ResumeLayout(false); this.radPageViewPage3.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.radLabel1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dragModeCombo)).EndInit(); this.ResumeLayout(false); }
public GridViewRowInfo EndAddNewRow() { if (!this.newRowInitialized || !this.IsModified) { return((GridViewRowInfo)null); } GridViewCollectionChangingEventArgs args1 = new GridViewCollectionChangingEventArgs(this.ViewTemplate, Telerik.WinControls.Data.NotifyCollectionChangedAction.Add, (object)null, this.ViewTemplate.Rows.Count, -1); this.ViewTemplate.EventDispatcher.RaiseEvent <GridViewCollectionChangingEventArgs>(EventDispatcher.RowsChanging, (object)this.ViewTemplate, args1); if (args1.Cancel) { return((GridViewRowInfo)null); } GridViewRowCancelEventArgs args2 = new GridViewRowCancelEventArgs(new GridViewRowInfo[1] { (GridViewRowInfo)this }); this.ViewTemplate.EventDispatcher.RaiseEvent <GridViewRowCancelEventArgs>(EventDispatcher.UserAddingRow, (object)this.ViewTemplate, args2); if (args2.Cancel) { return((GridViewRowInfo)null); } if (this.ViewTemplate.IsVirtualRows) { GridViewObjectRelationalDataProvider hierarchyDataProvider = this.ViewTemplate.HierarchyDataProvider as GridViewObjectRelationalDataProvider; GridViewRowInfo rowInfo = (GridViewRowInfo)this; if (hierarchyDataProvider != null && this.ViewTemplate.AutoUpdateObjectRelationalSource) { rowInfo = hierarchyDataProvider.AddNewRow(this) ?? (GridViewRowInfo)this; this.ViewInfo.Refresh(); if (rowInfo != this) { if (!this.deferUserAddedRow) { GridViewRowEventArgs args3 = new GridViewRowEventArgs(rowInfo); this.ViewTemplate.EventDispatcher.RaiseEvent <GridViewRowEventArgs>(EventDispatcher.UserAddedRow, (object)this.ViewTemplate, args3); } else { this.addedRow = rowInfo; this.deferUserAddedRow = false; } if (this.moveToLastRow) { rowInfo.IsCurrent = true; this.moveToLastRow = false; } else { this.ViewTemplate.MasterTemplate.CurrentRow = (GridViewRowInfo)this.ViewInfo.TableAddNewRow; } } } else { GridViewRowEventArgs args3 = new GridViewRowEventArgs((GridViewRowInfo)this); this.ViewTemplate.EventDispatcher.RaiseEvent <GridViewRowEventArgs>(EventDispatcher.UserAddedRow, (object)this.ViewTemplate, args3); } GridViewSynchronizationService.DispatchEvent(this.ViewTemplate, new GridViewEvent((object)this.ViewTemplate, (object)this.ViewTemplate, new object[1] { (object)new DataViewChangedEventArgs(ViewChangedAction.Add, (object)this) }, new GridViewEventInfo(KnownEvents.ViewChanged, GridEventType.Both, GridEventDispatchMode.Send)), false); return(rowInfo); } int count = this.ViewTemplate.ListSource.Count; GridViewRowInfo rowInfo1 = this.boundRow; try { this.ViewTemplate.Rows.addingThroughUI = true; this.ViewTemplate.BeginUpdate(); IEditableObject editableObject = rowInfo1 != null ? rowInfo1.DataBoundItem as IEditableObject : (IEditableObject)null; if (rowInfo1 == null) { rowInfo1 = this.ViewTemplate.ListSource.AddNew(); editableObject = rowInfo1.DataBoundItem as IEditableObject; editableObject?.BeginEdit(); } else { this.boundRow.IsVisible = true; } rowInfo1.AddingNewDataRow = true; bool flag = false; for (int index = 0; index < this.ViewTemplate.Columns.Count; ++index) { GridViewColumn column = (GridViewColumn)this.ViewTemplate.Columns[index]; object obj = this[column]; if (obj == null) { GridViewCheckBoxColumn viewCheckBoxColumn = column as GridViewCheckBoxColumn; if (viewCheckBoxColumn != null && viewCheckBoxColumn.DataType.IsValueType) { object instance = Activator.CreateInstance(viewCheckBoxColumn.DataType); rowInfo1[column] = instance; } } else if (this.changedColumns.Contains((object)column)) { flag = true; rowInfo1[column] = obj; } } if (flag) { editableObject?.EndEdit(); this.ViewTemplate.EndUpdate(false); GridViewSynchronizationService.SuspendEvent(this.ViewTemplate, KnownEvents.CurrentChanged); ((ICancelAddNew)this.ViewTemplate.ListSource).EndNew(this.ViewTemplate.ListSource.Count - 1); GridViewSynchronizationService.ResumeEvent(this.ViewTemplate, KnownEvents.CurrentChanged); if (!this.deferUserAddedRow) { GridViewRowEventArgs args3 = new GridViewRowEventArgs(rowInfo1); this.ViewTemplate.EventDispatcher.RaiseEvent <GridViewRowEventArgs>(EventDispatcher.UserAddedRow, (object)this.ViewTemplate, args3); this.addedRow = (GridViewRowInfo)null; } else { this.addedRow = rowInfo1; } this.deferUserAddedRow = false; if (this.moveToLastRow) { rowInfo1.IsCurrent = true; this.moveToLastRow = false; } else { this.ViewTemplate.MasterTemplate.CurrentRow = (GridViewRowInfo)this.ViewInfo.TableAddNewRow; } } else { if (this.boundRow != null || this.ViewTemplate.ListSource.Count > count) { ((ICancelAddNew)this.ViewTemplate.ListSource).CancelNew(this.ViewTemplate.ListSource.Count - 1); } this.ViewTemplate.EndUpdate(false); } } catch (Exception ex) { if (this.boundRow != null || this.ViewTemplate.ListSource.Count > count) { ((ICancelAddNew)this.ViewTemplate.ListSource).CancelNew(this.ViewTemplate.ListSource.Count - 1); } this.ViewTemplate.EndUpdate(false); this.ViewTemplate.SetError(new GridViewCellCancelEventArgs((GridCellElement)null, (IInputEditor)null), ex); return((GridViewRowInfo)null); } finally { this.boundRow = (GridViewRowInfo)null; this.newRowInitialized = false; this.IsModified = false; this.ClearCache(); this.changedColumns.Clear(); this.InvalidateRow(); this.ViewTemplate.Rows.addingThroughUI = false; if (this.ViewTemplate != null && this.ViewTemplate.ListSource != null) { this.ViewTemplate.ListSource.CreateATransactionForEveryValueSetting = true; } if (rowInfo1 != null) { rowInfo1.AddingNewDataRow = false; } if (this.ViewInfo.ParentRow != null && this.ViewInfo.SummaryRows.Count > 0) { ++this.ViewInfo.summaryValueVersion; this.ViewTemplate.MasterTemplate.SynchronizationService.DispatchEvent(new GridViewEvent((object)this.ViewTemplate, (object)this, new object[1] { (object)new DataViewChangedEventArgs(ViewChangedAction.DataChanged, (IList)null) }, new GridViewEventInfo(KnownEvents.ViewChanged, GridEventType.Both, GridEventDispatchMode.Send))); } } return(rowInfo1); }
/// <summary> /// Dar Formato a la Grilla /// </summary> private void FormatDataGrid() { try { Telerik.WinControls.UI.Localization.RadGridLocalizationProvider.CurrentProvider = new Infrastructure.WinForms.Controls.MySpanishRadGridLocalizationProvider(); this.grdItems.Columns.Clear(); this.grdItems.AllowAddNewRow = false; Telerik.WinControls.UI.GridViewCommandColumn commandColumn; commandColumn = new Telerik.WinControls.UI.GridViewCommandColumn(); commandColumn.Name = "Edit"; commandColumn.HeaderText = "Editar"; commandColumn.DefaultText = "Editar"; commandColumn.UseDefaultText = true; this.grdItems.Columns.Add(commandColumn); this.grdItems.Columns["Edit"].AllowSort = false; this.grdItems.Columns["Edit"].AllowFiltering = false; commandColumn = new GridViewCommandColumn(); commandColumn.Name = "Delete"; commandColumn.HeaderText = "Eliminar"; commandColumn.DefaultText = "Eliminar"; commandColumn.UseDefaultText = true; this.grdItems.Columns.Add(commandColumn); this.grdItems.Columns["Delete"].AllowSort = false; this.grdItems.Columns["Delete"].AllowFiltering = false; this.grdItems.Columns.Add("CUBA_Codigo", "Código", "CUBA_Codigo"); this.grdItems.Columns.Add("TipoCuenta", "Tipo de Cuenta", "TipoCuenta"); this.grdItems.Columns.Add("CUBA_NroCuenta", "Número de Cuenta", "CUBA_NroCuenta"); this.grdItems.Columns.Add("TIPO_MND", "Moneda", "TIPO_MND"); this.grdItems.Columns.Add("TIPO_BCO", "Banco", "TIPO_BCO"); this.grdItems.Columns.Add("CUBA_Descripcion", "Descripción", "CUBA_Descripcion"); Telerik.WinControls.UI.GridViewCheckBoxColumn _CUBA_Bloqueo = new Telerik.WinControls.UI.GridViewCheckBoxColumn(); _CUBA_Bloqueo.Name = "CUBA_Bloqueo"; _CUBA_Bloqueo.HeaderText = "Bloqueo"; _CUBA_Bloqueo.FieldName = "CUBA_Bloqueo"; this.grdItems.Columns.Add(_CUBA_Bloqueo); Telerik.WinControls.UI.GridViewCheckBoxColumn _CUBA_PermChequeBlanco = new Telerik.WinControls.UI.GridViewCheckBoxColumn(); _CUBA_PermChequeBlanco.Name = "CUBA_PermChequeBlanco"; _CUBA_PermChequeBlanco.HeaderText = "Permitir Cheque en Blanco"; _CUBA_PermChequeBlanco.FieldName = "CUBA_PermChequeBlanco"; this.grdItems.Columns.Add(_CUBA_PermChequeBlanco); Telerik.WinControls.UI.GridViewCheckBoxColumn _CheckBox = new Telerik.WinControls.UI.GridViewCheckBoxColumn(); this.grdItems.Columns.Add("CUBA_CuenContable", "Cta. Contable", "CUBA_CuenContable"); this.grdItems.Columns.Add("CUBA_CuenPuente", "Cta. Puente", "CUBA_CuenPuente"); _CheckBox = new Telerik.WinControls.UI.GridViewCheckBoxColumn(); _CheckBox.Name = "CUBA_CtaEmprVinculada"; _CheckBox.HeaderText = "Empr. Vinculada"; _CheckBox.FieldName = "CUBA_CtaEmprVinculada"; this.grdItems.Columns.Add(_CheckBox); _CheckBox = new Telerik.WinControls.UI.GridViewCheckBoxColumn(); _CheckBox.Name = "CUBA_PermImprAutomatica"; _CheckBox.HeaderText = "Impr. Automática"; _CheckBox.FieldName = "CUBA_PermImprAutomatica"; this.grdItems.Columns.Add(_CheckBox); _CheckBox = new Telerik.WinControls.UI.GridViewCheckBoxColumn(); _CheckBox.Name = "CUBA_MedioVirtual"; _CheckBox.HeaderText = "Medio Virtual"; _CheckBox.FieldName = "CUBA_MedioVirtual"; this.grdItems.Columns.Add(_CheckBox); _CheckBox = new Telerik.WinControls.UI.GridViewCheckBoxColumn(); _CheckBox.Name = "CUBA_InscritoSOL"; _CheckBox.HeaderText = "Detracciones"; _CheckBox.FieldName = "CUBA_InscritoSOL"; this.grdItems.Columns.Add(_CheckBox); this.grdItems.Columns.Add("SUCR_Desc", "Sucursal", "SUCR_Desc"); this.grdItems.Columns.Add("CUBA_FechaCierre", "Fecha Cierre", "CUBA_FechaCierre"); grdItems.BestFitColumns(); tsmColumnas.DropDownItems.Clear(); defaultColumns = new string[grdItems.Columns.Count]; int index = 0; foreach (Telerik.WinControls.UI.GridViewDataColumn column in grdItems.Columns) { ToolStripMenuItem _item = new ToolStripMenuItem(column.HeaderText); _item.Tag = column.Name; _item.Checked = column.IsVisible; _item.CheckOnClick = true; _item.Click += new EventHandler(tsmColumna_Click); tsmColumnas.DropDownItems.Add(_item); if (column.IsVisible) { defaultColumns[index] = column.Name; index += 1; } } ToolStripSeparator tsmSeparacion = new ToolStripSeparator(); tsmColumnas.DropDownItems.Add(tsmSeparacion); tsmTodos = new ToolStripMenuItem("Todos"); tsmTodos.Tag = "Todas"; tsmTodos.Checked = false; tsmTodos.CheckOnClick = true; tsmTodos.Click += new EventHandler(tsmTodos_Click); tsmColumnas.DropDownItems.Add(tsmTodos); Infrastructure.WinForms.Controls.GridAutoFit.Fit(grdItems); grdItems.ShowFilteringRow = false; grdItems.EnableFiltering = false; grdItems.MasterTemplate.EnableFiltering = false; grdItems.EnableGrouping = false; grdItems.MasterTemplate.EnableGrouping = false; grdItems.EnableSorting = false; grdItems.MasterTemplate.EnableCustomSorting = false; } catch (Exception ex) { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Presenter.Title, Infrastructure.Aspect.Constants.Mensajes.FormatDataGridView, ex); } }