dynamically adding a panel

Hi,

I am trying to get a numeric updown inside a panel with a button.
This is the achieve xcel like insert. Once the user right clicks a cell and clicks insert, I need a small box with either radio button or numericupdown. The user selects a value in the numericupdown and clicks ok. now this value should be taken as input

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();
//stack them from the left
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);
box.Show();
btn.Click += new EventHandler(btn_Click);
//gridControl1.RowHeights[2] = 20;
//gridControl1.ColWidths[2] = 64; gridControl1[2, 2].CellType = "Control";
//gridControl1[2, 2].Control = box; this.Controls.Add(box);
theData.CreateRowsToInsert(rowNumber, numberOfRowstobeInserted);

I dont see a panel showing. even if the user clicks insert, there is no panel/numericupdown

Please suggest
smitha



1 Reply

MC Mercy C Syncfusion Team April 10, 2012 08:54 AM UTC

Hi Smitha,

Thanks for your interest in Syncfusion products.

Your query in forum incident 103122 is same as this incident I suppose. Please do follow up the incident 103122.

Please let me know if you have any concerns.

Regards,
Mercy.C


Loader.
Up arrow icon