I have a WPF application where I need to work on datagrid ,in column header I have added image button to each column which when clicked should pop up with that specific column name and other details. Currently I have done this:
void data1_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e)
{
EventManager.RegisterClassHandler(typeof(Button), Button.ClickEvent, new RoutedEventHandler(btnFilterImage_Click) );
}
private void btnFilterImage_Click(object sender, RoutedEventArgs e)
{
viewModel.OnYieldDistinctValues(reportDatagrid.Columns.ToString());
lstYield.ItemsSource = viewModel.TextFilters;
popYield.Placement = PlacementMode.MousePoint;
popYield.IsOpen = true;
}
My question is how can I get the particular column name in btnFilterImage_Click. Please help.!!
Thanks!!