Hi,
I have a combobox and a datagridview bound to a table in my database.The combobox shows the "ID"s and i want to display a complete row in the gridview based on a selected id in the combobox.
swagatjena
0
Newbie Poster
Recommended Answers
Jump to Postyou need to make sure your combobox is accessable (make it public) and do something like
int id = Convert.ToInt32(combBox.text); string sqlStatement = "SELECT columnName1, columnName2, columnName3 FROM TableName WHERE IDColumn = ' + id + '";
Hope this helps
All 3 Replies
ChrisHunter
152
Posting Whiz in Training
Featured Poster
swagatjena
0
Newbie Poster
ChrisHunter
152
Posting Whiz in Training
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.