Reg windows forms syncfusion, grid control I am trying to add a popup box like the one we have in xcel. On rightclicking a cell and then insert, a small popup box asking how many rows needs to be inserted.
So this is what I have done
private void InsertRowToolStripMenuItem_Click(object sender, EventArgs e)
{
GridRangeInfoList list;
list = theGrid.Selections.GetSelectedRows(true, false);
int rowNumber = list.ActiveRange.Top;
Panel box = new Panel(); //
NumericUpDown ud1 = new NumericUpDown();
ud1.Dock = DockStyle.Left; ud1.Width = 30;
ud1.BorderStyle = BorderStyle.FixedSingle;
box.Controls.Add(ud1);
box.BorderStyle = BorderStyle.None;
Button btn = new Button();
btn.Dock = DockStyle.Bottom;
btn.Text = "OK";
box.Controls.Add(btn);
this.Controls.AddRange(new System.Windows.Forms.Control[] { box });
btn.Click += new EventHandler(btn_Click);
theGrid.Controls.Add(box);
box.Dock = DockStyle.Bottom;
box.Show();
numberOfRowstobeInserted = (int)ud1.Value;
this.Controls.Add(box);
theData.CreateRowsToInsert(rowNumber, numberOfRowstobeInserted);
theGrid.Refresh();
}
But this way of adding a panel with a numeric updown doesn't seem to work. Basically, once the click on insert, I want a small window/panel wiht a numeric updown and a Button. The user selects a value from the up/down and then clicks the ok button.
Any suggestions?
Thanks Sun