protected void bt_Decrease_Click(object sender, EventArgs e) { SaveGrid(); int rowindex = ((GridViewRow)((Button)sender).Parent.Parent).RowIndex; if (rowindex > 0) { Guid id = (Guid)gv_List.DataKeys[rowindex][0]; Rpt_ReportGridColumnsBLL bll = new Rpt_ReportGridColumnsBLL(id); if (bll.Model.ColumnSortID > 0) { bll.Model.ColumnSortID--; } bll.Update(); id = (Guid)gv_List.DataKeys[rowindex - 1][0]; bll = new Rpt_ReportGridColumnsBLL(id); bll.Model.ColumnSortID++; bll.Update(); } BindGrid(); }
private void SaveGrid() { foreach (GridViewRow row in gv_List.Rows) { Guid id = (Guid)gv_List.DataKeys[row.RowIndex][0]; Rpt_ReportGridColumnsBLL column = new Rpt_ReportGridColumnsBLL(id); column.Model.DisplayName = ((TextBox)row.FindControl("tbx_DisplayName")).Text; column.Model.Visible = ((RadioButtonList)row.FindControl("rbl_Visible")).SelectedValue; column.Model.AddSummary = ((RadioButtonList)row.FindControl("rbl_AddSummary")).SelectedValue; column.Update(); } }
protected void bt_Decrease_Click(object sender, EventArgs e) { SaveGrid(); int rowindex = ((GridViewRow)((Button)sender).Parent.Parent).RowIndex; if (rowindex > 0) { Guid id = (Guid)gv_List.DataKeys[rowindex][0]; Rpt_ReportGridColumnsBLL bll = new Rpt_ReportGridColumnsBLL(id); if (bll.Model.ColumnSortID > 0) bll.Model.ColumnSortID--; bll.Update(); id = (Guid)gv_List.DataKeys[rowindex - 1][0]; bll = new Rpt_ReportGridColumnsBLL(id); bll.Model.ColumnSortID++; bll.Update(); } BindGrid(); }
private void SaveGrid() { foreach (GridViewRow row in gv_List.Rows) { Guid id = (Guid)gv_List.DataKeys[row.RowIndex][0]; Rpt_ReportGridColumnsBLL column = new Rpt_ReportGridColumnsBLL(id); column.Model.DisplayName = ((TextBox)row.FindControl("tbx_DisplayName")).Text; column.Model.Visible = ((RadioButtonList)row.FindControl("rbl_Visible")).SelectedValue; column.Model.AddSummary = ((RadioButtonList)row.FindControl("rbl_AddSummary")).SelectedValue; column.Update(); } }