开发者

windows forms, how to launch a separate window with datagridview?

开发者 https://www.devze.com 2023-03-08 11:29 出处:网络
I\'ve some data that can be shown on grid attached on a panel. When user clicks some button i\'m showing this panel. Now i wanted to launch this grid in a separate window(should be a child to existing

I've some data that can be shown on grid attached on a panel. When user clicks some button i'm showing this panel. Now i wanted to launch this grid in a separate window(should be a child to existing window) and want to make the grid editable, click controls...etc, is it possible?

thanks in advan开发者_C百科ce.


You should be able to achieve this effect by placing your grid on a separate form, complete with editing stuff. Disable the form and set its parent, (see control.parent), to be the main form panel. When the user wants to edit it, set the grid-form parent to nil and enable it.

Not actually tried this with WinForms, but it works fine with Delphi VCL so worth a test if no better answers are forthcoming

Rgds, Martin

0

精彩评论

暂无评论...
验证码 换一张
取 消