protected void cb_Init(object sender, EventArgs e) { ASPxCheckBox checkBox = sender as ASPxCheckBox; GridViewGroupRowTemplateContainer container = checkBox.NamingContainer as GridViewGroupRowTemplateContainer; checkBox.ClientSideEvents.CheckedChanged = string.Format("function(s, e){{ grid.PerformCallback('{0};' + s.GetCheckState()); }}", container.VisibleIndex); }
public string GetSummaryValue(GridViewGroupRowTemplateContainer c) { var grid = c.Grid; var summary = grid.GroupSummary["ID"]; var sumValue = grid.GetGroupSummaryValue(c.VisibleIndex, summary); return(sumValue.ToString()); }
protected void checkBox_Load(object sender, EventArgs e) { ASPxCheckBox checkBox = (ASPxCheckBox)sender; GridViewGroupRowTemplateContainer c = (GridViewGroupRowTemplateContainer)checkBox.NamingContainer; checkBox.ClientSideEvents.CheckedChanged = string.Format("function(s, e){{ console.log('CheckedChanged'); lookup.GetGridView().PerformCallback('{0};' + s.GetChecked()); }}", c.VisibleIndex); checkBox.Checked = GetChecked(c); }
protected void ASPxCheckBox1_Init(object sender, EventArgs e) { ASPxCheckBox cb = sender as ASPxCheckBox; GridViewGroupRowTemplateContainer container = cb.NamingContainer as GridViewGroupRowTemplateContainer; if (ASPxGridView1.IsRowExpanded(container.VisibleIndex)) { cb.Checked = true; } cb.ClientSideEvents.CheckedChanged = string.Format("function (s, e) {{ ExpandCollapse(s, {0}); }}", container.VisibleIndex); }
void checkBox_Init(object sender, System.EventArgs e) { ASPxCheckBox checkBox = sender as ASPxCheckBox; GridViewGroupRowTemplateContainer container = checkBox.NamingContainer as GridViewGroupRowTemplateContainer; checkBox.ClientSideEvents.CheckedChanged = string.Format( "function(s, e){{ {0}.PerformCallback('{1};{2};' + s.GetChecked()); }}", gridId, container.VisibleIndex, container.Column.FieldName); }
protected bool GetChecked(GridViewGroupRowTemplateContainer c) { for (int i = 0; i < c.Grid.GetChildRowCount(c.VisibleIndex); i++) { bool isRowSelected = c.Grid.Selection.IsRowSelectedByKey(c.Grid.GetChildDataRow(c.VisibleIndex, i)["ProductID"]); if (!isRowSelected) { return(false); } } return(true); }
protected void ASPxComboBox1_Init(object sender, EventArgs e) { ASPxComboBox cb = (ASPxComboBox)sender; GridViewGroupRowTemplateContainer container = (GridViewGroupRowTemplateContainer)cb.NamingContainer; cb.DataSource = AccessDataSource2; cb.DataBind(); int catID = (int)container.KeyValue; cb.ClientSideEvents.SelectedIndexChanged = string.Format("function(s,e){{grid.PerformCallback('{0}'+';'+s.GetSelectedItem().value);}}", catID); cb.SelectedIndex = cb.Items.IndexOfValue(catID); }
public string ObtenerCabezeraGrupo(object Container) { try { string Cabezera = ""; GridViewGroupRowTemplateContainer row = (GridViewGroupRowTemplateContainer)Container; Cabezera = "Lote: " + row.GroupTexts[1] + " Nombre: " + row.GroupTexts[2] + " " + row.SummaryText; return(Cabezera); } catch (Exception Ex) { FG.Controlador_Error(Ex, Page.Response); return(""); } }
//BOTON PARA REGISTRAR NUEVO PAGO protected void ASPxButton_Nuevo_Click(object sender, EventArgs e) { try { GridViewGroupRowTemplateContainer row = (GridViewGroupRowTemplateContainer)((sender as ASPxButton).NamingContainer); string IdAsignacion = row.KeyValue.ToString(); Session["IdAsignacionPago"] = IdAsignacion; Session["IdPago"] = "0"; Response.Redirect("RegistrarPago.aspx"); } catch (Exception Ex) { FG.Controlador_Error(Ex, Page.Response); } }
protected void cb_Load(object sender, EventArgs e) { ASPxCheckBox checkBox = sender as ASPxCheckBox; GridViewGroupRowTemplateContainer container = checkBox.NamingContainer as GridViewGroupRowTemplateContainer; if (ASPxGridView1.Selection.Count != 0) { int rowInGroupCount = ASPxGridView1.GetChildRowCount(container.VisibleIndex); int countToCompare = 0; for (int j = 0; j < rowInGroupCount; j++) { DataRow row = ASPxGridView1.GetChildDataRow(container.VisibleIndex, j); var key = row["ProductID"]; if (ASPxGridView1.Selection.IsRowSelectedByKey(key)) { countToCompare++; } } if (rowInGroupCount == countToCompare) { checkBox.CheckState = CheckState.Checked; } else if (rowInGroupCount > countToCompare && countToCompare != 0) { checkBox.CheckState = CheckState.Indeterminate; } else if (countToCompare == 0) { checkBox.CheckState = CheckState.Unchecked; } } else { checkBox.CheckState = CheckState.Unchecked; } }
protected string GetCaptionText(GridViewGroupRowTemplateContainer container) { string captionText = !string.IsNullOrEmpty(container.Column.Caption) ? container.Column.Caption : container.Column.FieldName; return(string.Format("{0} : {1} {2}", captionText, container.GroupText, container.SummaryText)); }