December 17th, 2012, 01:18 AM
transferring multiple row data from listview to datagridview c sharp
I am using c# and my question is: I have a problem in ListView and DataGridView. I have one ListView from which specific data of three column is populated from the database. I have also a DataGridView. What I want to do is when I double click a specific item from the ListView, I want it to populate the DataGridView each time I double click the list to populate the DataGridView with that specific item along with multiple columns it has from the database. My condition is it only populate the single item for the list to the DataGridView.
For example I have a row in the list with title, actor and genre columns and in the GridView I want it to populate all related data (columns) from database to DataGridView when list view with specific movie is double clicked. Now it load only the title.
foreach (ListViewItem item in listViewEx1.SelectedItems)
Tags for this Thread
Click Here to Expand Forum to Full Width