ToolStripMenuItems from SQL
-
Hi, Is there any way i can get a list of items i want added to a ToolStripMenu from SQL. I have a database which contains records that i enter using the application im developing. However, i want to be able to use the SELECT DISTINCT SQL command, to retrieve the names of something from a column, and put it into my toolstrip. Is there any way of doing this? Id be grateful of anybodys help :)
-
Hi, Is there any way i can get a list of items i want added to a ToolStripMenu from SQL. I have a database which contains records that i enter using the application im developing. However, i want to be able to use the SELECT DISTINCT SQL command, to retrieve the names of something from a column, and put it into my toolstrip. Is there any way of doing this? Id be grateful of anybodys help :)
-
Create a function call "GenerateToolStripMenu()" or something, when you filled the data to the dataset, fire the function. e.g. for (int i = 0; i < database1DataSet.Table1.Rows.Count; i++) { menuStrip1.Items.Add(database1DataSet.Table1.Rows[i][%your_column_name_here%].ToString()); }