Hi there,
i want put one more buttons in same cell on wingrid. It's possible ?
Thanks. its working
Hello ,
I am glad to hear that you were able to find solution for your issue.
In order to have button visible when cell is not in edit mode you should set RendaringControl property of ControlContainerEditor. Please note that RendaringControl and EditingControl must be two different instance. So your code should looks like :
FlowLayoutPanel flow = new FlowLayoutPanel();
flow.AutoSize = true;
flow.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
Button btn = new Button();
btn.Text = "BUTTON";
btn.AutoSize = true;
// btn.Click += new EventHandler(btn_Click);
flow.Controls.Add(btn);
FlowLayoutPanel flow1 = new FlowLayoutPanel();
flow1.AutoSize = true;
flow1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
Button btn1 = new Button();
btn1.Text = "BUTTON";
btn1.AutoSize = true;
flow1.Controls.Add(btn1);
ControlContainerEditor c = new ControlContainerEditor();
c.EditingControl = flow;
c.RenderingControl = flow1;
c.ApplyOwnerAppearanceToEditingControl = true;
c.ApplyOwnerAppearanceToRenderingControl = true;
I solved this problem, but now got another one. I put many buttons in cells with this code :
FlowLayoutPanel flow = new FlowLayoutPanel();flow.AutoSize = true;flow.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;Button btn = new Button();btn.Text = "BUTTON";btn.AutoSize = true;btn.Click += new EventHandler(btn_Click);flow.Controls.Add(btn);
ControlContainerEditor c = new ControlContainerEditor();c.EditingControl = flow;c.ApplyOwnerAppearanceToEditingControl = true;c.ApplyOwnerAppearanceToRenderingControl = true;grd.Rows[0].Cells[Kolon].Editor = c;
And my problem is this; only active cell's editor showing and i must click cell for see that editor control. Can i see always these added controls ?