private void Open(string filename) { using (ReoGridEditor editor = new ReoGridEditor()) { editor.CurrentFilePath = filename; editor.ShowDialog(); } }
private void snowWhiteToolStripMenuItem_Click(object sender, EventArgs e) { using (ReoGridEditor editor = new ReoGridEditor()) { ReoGridControlStyle rgcs = new ReoGridControlStyle(Color.LightSkyBlue, Color.White, false); rgcs.SetColor(ReoGridControlColors.SelectionBorder, Color.SkyBlue); rgcs.SetColor(ReoGridControlColors.SelectionFill, Color.FromArgb(30, Color.Blue)); rgcs.SetColor(ReoGridControlColors.GridLine, Color.FromArgb(220, 220, 255)); rgcs.SetColor(ReoGridControlColors.GridBackground, Color.White); editor.Grid.SetControlStyle(rgcs); editor.ShowDialog(); } }
private void Open(string filename) { try { Cursor = Cursors.WaitCursor; using (ReoGridEditor editor = new ReoGridEditor()) { #if DEBUG editor.CurrentFilePath = System.IO.Path.Combine("..\\..\\..\\Samples\\", filename); #else editor.CurrentFilePath = filename; #endif editor.ShowDialog(); } } finally { Cursor = Cursors.Default; } }
private void goldSilverToolStripMenuItem_Click(object sender, EventArgs e) { using (ReoGridEditor editor = new ReoGridEditor()) { ReoGridControlStyle rgcs = new ReoGridControlStyle(Color.White, Color.DarkOrange, false); rgcs.SetColor(ReoGridControlColors.GridBackground, Color.DimGray); rgcs.SetColor(ReoGridControlColors.GridLine, Color.Gray); editor.Grid.SetControlStyle(rgcs); editor.ShowDialog(); } }
private void button25_Click(object sender, EventArgs e) { using (ReoGridEditor editor = new ReoGridEditor()) { editor.Grid.Script = @"// Joke sample: reoquery function reo(cell) { this.cell = cell; this.val = function(str) { if(__args__.length == 0) { return this.cell.data; } else { this.cell.data = str; return this; } }; this.style = function(key, value) { if (__args__.length == 1) { return this.cell.style[key]; } else { this.cell.style[key] = value; return this; } }; } script.$ = function(r, c) { return new reo( c == null ? grid.getCell(r) : grid.getCell(r, c)); }; // call grid like jquery $('B4').val('hello').style('backgroundColor', 'yellow'); $(3, 2).val('world!').style('backgroundColor', 'lightgreen'); "; editor.Grid[1, 1] = "Please see the script editor!"; editor.NewDocumentOnLoad = false; editor.ShowDialog(); } }