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

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -