Hi there,
I have a datagrid that is bound to a custom list. Each row has a button and a combobox. In the click event of the button I wish to determine what value is selected in the combobox of the same row:
<DataGrid x:Name="myDataGrid"><DataGrid.Columns> ...<DataGridTemplateColumn><DataGridTemplateColumn.CellTemplate><DataTemplate><ComboBox x:Name="comboboxAction" /></DataTemplate></DataGridTemplateColumn.CellTemplate></DataGridTemplateColumn><DataGridTemplateColumn Header="Action"><DataGridTemplateColumn.CellTemplate><DataTemplate><Button x:Name="buttonAction">Submit</Button></DataTemplate></DataGridTemplateColumn.CellTemplate></DataGridTemplateColumn></DataGrid.Columns></DataGrid>
So when the user clicks "Submit" I want it to determine which item in the bound list is selected (which I can do by casting the SelectedItem), then determine what action has been selected in the combobox for that particular item and action it.
Thanks,
Jib