Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

My Datagrid_SelectionChanged Event Isn't Getting Hit

$
0
0

Hi,

I have a datagrid that gets populated via dataTable, the dataTable is created in a method in the constructor when the form loads. Once I have made the datagrid.datasource = dataTable I need to access the values of the selected row that the user clicks. I have an event

        private void dataGrid_SelectionChanged(object sender, EventArgs e)
        {
            MessageBox.Show("Selection Changed");
        }

But this event doesn't get fired, why? And how do I access the clicked / selected row in the datagrid?


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>