c# - Is it possible to bind datatable to the ToolStripMenuItem? -
i'm using contextmenustrip & created submenus under contextmenustrip @ runtime. adding object of toolstripmenuitem class. i'm having 1 datatable table want populate submenus using id & name field datatable further processing of application.
is possible?
thanks.
try this:
foreach (datarow dr in datatable.rows) { cms.items.add(new toolstripmenuitem() { text = dr["name"].tostring() }); }
Comments
Post a Comment