Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 268
  • Last Modified:

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)
0
tbaseflug
Asked:
tbaseflug
1 Solution
 
AGBrownCommented:
Create an event handler for the SelectedIndexChanged event. Inside that, you can pick up the new selected item by using:
myDataGrid.SelectedItem.

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.

Andy
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now