private void bgrid_Click(object sender, EventArgs e) { if (GridOptions.AlterGridOptions(Report)) { subreportedit.Redraw(); } }
public static bool AlterGridOptions(Report nreport) { bool nresult = false; using (GridOptions ndia = new GridOptions()) { ndia.bcolor.BackColor = GraphicUtils.ColorFromInteger(nreport.GridColor); ndia.checkenabled.Checked = nreport.GridEnabled; ndia.textwidth.Text = Twips.TextFromTwips(nreport.GridWidth); ndia.textheight.Text = Twips.TextFromTwips(nreport.GridHeight); if (nreport.GridLines) { ndia.combostyle.SelectedIndex = 1; } else { ndia.combostyle.SelectedIndex = 0; } ndia.checkvisible.Checked = nreport.GridVisible; if (ndia.ShowDialog() == DialogResult.OK) { nreport.GridLines = (ndia.combostyle.SelectedIndex == 1); nreport.GridEnabled = ndia.checkenabled.Checked; nreport.GridWidth = Twips.TwipsFromText(ndia.textwidth.Text); nreport.GridHeight = Twips.TwipsFromText(ndia.textheight.Text); nreport.GridColor = GraphicUtils.IntegerFromColor(ndia.bcolor.BackColor); nreport.GridVisible = ndia.checkvisible.Checked; nresult = true; } } return(nresult); }