In following example I am try to get the Selected value of Combo Box which is in DataGridView.
Create a Windows Applicaiton and Add a DataGridView in the Form1
We need to initialise DataGridViewEditingControlShowingEventHandler of DataGridView to handle its control events, so please use follwoing code in Forms Constructor
In the form load we will fetch all the data and assign to DataGridView
Now catch the control edit event in the DataGridView and assign the SelectIndexChanged event to each Combo Box in DataGridView
Add Follwoing Combo Box's SelectedIndexChanged which we assigned to all the combo boxes in DataGridView
Now we are ready with our code lets build, run and test.
Output:
Tags: Getting the Selected Value of Combo Box in DataGridView, DataGridView
No comments:
Post a Comment