Filter Dataset/Current DG Source

I have a DataGrid bound to a dataset - what I want to do is, when the user select s a row, to filter the grid's source and bind labels with details from the dataset  - specific to the row selected (datagrid contains product list - selecting row will bind labels above datagrid to product details)
Who is Participating?
Create an event handler for the SelectedIndexChanged event. Inside that, you can pick up the new selected item by using:

This will be a DataGridItem (can be cast down to a TableRow) from the datagrid. From this you can get your row identifier (product ID or name) and use that to get the details from the database that you want. Alternatively, if all the info is in the row, then you can just pick it out and write it to the labels.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.