protected void EmployeesGrid_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { int rowindex = EmployeesGrid.FindVisibleIndexByKeyValue(e.Keys[EmployeesGrid.KeyFieldName]); ASPxGridView grid = (ASPxGridView)sender; var id = grid.GetRowValues(rowindex, "ID").ToString(); db.D_MusteriTemsilcisi(Convert.ToInt32(id)); e.Cancel = true; EmployeesGrid.CancelEdit(); Update(); }
protected void EmployeesGrid_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { ASPxGridView grid = (ASPxGridView)sender; int rowindex = EmployeesGrid.FindVisibleIndexByKeyValue(e.Keys[EmployeesGrid.KeyFieldName]); string id = grid.GetRowValues(rowindex, "ID").ToString(); db.D_Duyurular(Convert.ToInt32(id)); e.Cancel = true; grid.CancelEdit(); BindGrid(); }
protected void EmployeesGrid_CustomUnboundColumnData(object sender, DevExpress.Web.ASPxGridViewColumnDataEventArgs e) { if (e.Column.FieldName == "Total") { if (e.IsGetData) { int visibleIndex = EmployeesGrid.FindVisibleIndexByKeyValue(e.GetListSourceFieldValue("FISNO")); e.Value = (visibleIndex != 0) ? Convert.ToDecimal(EmployeesGrid.GetRowValues(visibleIndex, "BORC")) + Convert.ToDecimal(EmployeesGrid.GetRowValues(visibleIndex, "ALACAK")) + Convert.ToDecimal(EmployeesGrid.GetRowValues(visibleIndex - 1, "Total")) : Convert.ToDecimal(EmployeesGrid.GetRowValues(visibleIndex, "BORC")) - Convert.ToDecimal(EmployeesGrid.GetRowValues(visibleIndex - 1, "Total")); } } }