开发者

about contextmenustrip

I've added contextmenustrip control at the time of designing of my application. And i want to edit that contxt menu at run time. And i want to add another menu & submenu on that c开发者_如何学编程ontext menu. And i want to add handler function for that runtime created menus. Whether is it possible? If possible then provide some documentation.

thanks.


I got an answer of my issue. the sample code used for solving this issue is as follows-

ToolStripMenuItem addContactToGroup = new ToolStripMenuItem();
addContactToGroup.Name = "addContactToGroupToolStripMenuItem";
addContactToGroup.Text = "Add Contact To Group";
addContactToGroup.Click += new System.EventHandler(addContactToGroup_Click);
this.contextMenuStripXtraGrid.Items.AddRange(new ToolStripItem[] { addContactToGroup });
gridControl1.ContextMenuStrip = this.contextMenuStripXtraGrid;

here this means form where contextmenustrip control is inserted.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜