protected void UiListaSku_Init(object sender, EventArgs e) { var lookup = (DevExpress.Web.ASPxGridLookup)sender; DevExpress.Web.ASPxGridView pUilistaSku = lookup.GridView; pUilistaSku.CustomCallback += pUilistaSku_CustomCallback; }
protected void UiListaBodega_Init(object sender, EventArgs e) { var lookup = (DevExpress.Web.ASPxGridLookup)sender; DevExpress.Web.ASPxGridView pUilistaBodega = lookup.GridView; pUilistaBodega.CustomCallback += pUilistaBodega_CustomCallback; pUilistaBodega.PageIndexChanged += PUilistaBodega_PageIndexChanged; }
public void dtbindpending(DevExpress.Web.ASPxGridView gridpending) { DataTable dt = conn.GetDataTable(sqlpending2, null, dbtimeout); DataView dv = new DataView(dt); dv.Sort = sqlsortby; gridpending.DataSource = dv; gridpending.DataBind(); }
private void gridbind_lending(DevExpress.Web.ASPxGridView Grid, string category) { string key = reffnumber.Text; object[] par = new object[] { key, category }; DataTable dt = conn.GetDataTable(Q_VW_LENDING, par, dbtimeout); Grid.DataSource = dt; Grid.DataBind(); }
protected void LoadDxGrid(DevExpress.Web.ASPxGridView g, DataTable dt) { //// extract the current grouping //string currentGroupBy = g.GroupBy; g.DataSource = dt; //// resetting the GroupBy //g.GroupBy = currentGroupBy; // rebinding the Grid g.DataBind(); }
protected void ASPxGridViewNomina_CustomDataCallback(object sender, ASPxGridViewCustomDataCallbackEventArgs e) { DevExpress.Web.ASPxGridView grid = (DevExpress.Web.ASPxGridView)sender; object employeeID = e.Parameters; string clave = employeeID.ToString().Trim(); //se obtiene el empleado mediante el ID EmployeeBusinessObject _EmployeeBAL = new EmployeeBusinessObject(); EmployeeEntityOnject _EmployeeInfo = _EmployeeBAL.GetEmployee(clave); if (_EmployeeInfo != null) { e.Result = new string[] { _EmployeeInfo.Clave, _EmployeeInfo.NombreCompleto }; } }
protected void ASPxGridViewNomina_CustomDataCallback(object sender, ASPxGridViewCustomDataCallbackEventArgs e) { DevExpress.Web.ASPxGridView grid = (DevExpress.Web.ASPxGridView)sender; object conceptoID = e.Parameters; string clave = conceptoID.ToString().Trim(); //se obtiene el empleado mediante el ID ConceptoBusinessObject _ConceptoBAL = new ConceptoBusinessObject(); ConceptoEntityObject _ConceptoInfo = _ConceptoBAL.GetConcepto(clave); if (_ConceptoInfo != null) { e.Result = new string[] { _ConceptoInfo.Clave, _ConceptoInfo.Descripcion }; } }
public void dtbindpending(DevExpress.Web.ASPxGridView gridpending) { DataTable dt = conn.GetDataTable(sqlpending2, null, dbtimeout); DataView dv = new DataView(dt); dv.Sort = sqlsortby; gridpending.DataSource = dv; gridpending.DataBind(); hALL.Value = ""; for (int i = 0; i < dt.Rows.Count; i++) { hALL.Value += dt.Rows[i]["__KEY"].ToString() + ","; } }
private void LlenarGridLookSku() { try { //if (Session["DtSkuAvailable"] == null) // GetSkuAvailable(); gridLookSku.DataSource = Session["DtSkuAvailable"]; gridLookSku.DataBind(); } catch (Exception ex) { var lookup = (DevExpress.Web.Internal.GridViewWrapper)gridLookSku.GridView; DevExpress.Web.ASPxGridView test = lookup; lookup.JSProperties.Add("cpError", ex.Message); } }
public void createGridColumns(DevExpress.Web.ASPxGridView grid, DevExpress.Web.ASPxGridView gridpending) { DevExpress.Web.GridViewDataTextColumn p; DevExpress.Web.GridViewDataTextColumn c; for (int i = 0; i < dtparam.Rows.Count; i++) { string FieldNm = dtparam.Rows[i]["FIELDNM"].ToString(); string FieldDesc = dtparam.Rows[i]["FIELDDESC"].ToString(); string FieldReff = dtparam.Rows[i]["FIELDREFF"].ToString().ToUpper().Replace(":[", "[X].["); bool FieldKey = false; if (dtparam.Rows[i]["FIELDKEY"].ToString() != "") { FieldKey = (bool)dtparam.Rows[i]["FIELDKEY"]; } string FieldType = dtparam.Rows[i]["FIELDTYPE"].ToString(); bool isAuto = dtparam.Rows[i]["FIELDAUTO"].ToString().Trim() != ""; bool GroupBy = false; if (dtparam.Rows[i]["GROUPBY"].ToString() != "") { GroupBy = (bool)dtparam.Rows[i]["GROUPBY"]; } switch (FieldType) { case "d": break; } c = new DevExpress.Web.GridViewDataTextColumn(); if (FieldReff != "") { c.FieldName = FieldNm + "_DESC"; } else { c.FieldName = FieldNm; } c.Caption = FieldDesc; c.Settings.FilterMode = ColumnFilterMode.Value; c.Settings.AutoFilterCondition = AutoFilterCondition.Contains; if (dtparamschema.Columns[FieldNm].DataType.ToString() == "System.Guid" || isAuto) { c.Visible = false; } else if (dtparamschema.Columns[FieldNm].DataType.ToString() == "System.Double" || dtparamschema.Columns[FieldNm].DataType.ToString() == "System.Decimal") { c.PropertiesTextEdit.DisplayFormatString = "###,##0.00"; } else if (dtparamschema.Columns[FieldNm].DataType.ToString() == "System.DateTime") { c.PropertiesTextEdit.DisplayFormatString = "dd/MM/yyyy"; } grid.Columns.Add(c); if (GroupBy) { grid.GroupBy(c); } p = new DevExpress.Web.GridViewDataTextColumn(); if (FieldReff != "") { p.FieldName = FieldNm + "_DESC"; } else { p.FieldName = FieldNm; } p.Caption = FieldDesc; p.Settings.FilterMode = ColumnFilterMode.Value; p.Settings.AutoFilterCondition = AutoFilterCondition.Contains; if (dtparamschema.Columns[FieldNm].DataType.ToString() == "System.Guid" || isAuto) { p.Visible = false; } else if (dtparamschema.Columns[FieldNm].DataType.ToString() == "System.Double" || dtparamschema.Columns[FieldNm].DataType.ToString() == "System.Decimal") { p.PropertiesTextEdit.DisplayFormatString = "###,##0.00"; } else if (dtparamschema.Columns[FieldNm].DataType.ToString() == "System.DateTime") { p.PropertiesTextEdit.DisplayFormatString = "dd/MM/yyyy"; } gridpending.Columns.Add(p); if (GroupBy) { gridpending.GroupBy(p); } } p = new DevExpress.Web.GridViewDataTextColumn(); p.FieldName = "__STATUS"; p.Caption = "Status"; p.Settings.FilterMode = ColumnFilterMode.Value; p.Settings.AutoFilterCondition = AutoFilterCondition.Contains; gridpending.Columns.Add(p); p = new DevExpress.Web.GridViewDataTextColumn(); p.FieldName = "__CREATEDBY"; p.Caption = "Created By"; p.Settings.FilterMode = ColumnFilterMode.Value; p.Settings.AutoFilterCondition = AutoFilterCondition.Contains; gridpending.Columns.Add(p); grid.KeyFieldName = "__KEY"; gridpending.KeyFieldName = "__KEY"; }