I have a datagrid in my WPF application and i am binding an Ienumerable collection to the itemsource of the datagrid.
I need to add a handler for AutoGenerated columns in DataGrid after binding it. But i can't.
this.dataGrid1.ItemsSource = ineumerable_collection;
dataGrid1.AutoGeneratedColumns += new EventHandler(dataGrid1_AutoGeneratedColumns);//Not working
I have set Autogeneratecolumns as True in my XAML. But when i run my application it is not invoking the event handler dataGrid1_AutoGeneratedColumns. Thanks in advance if u could solve my problem!