This is a migrated thread and some comments may be shown as answers.

Atttach Event handler to code added combobox how ?

0 Answers 61 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 17 Oct 2013, 01:45 PM
I added a combobox to my grid via the following method
   GridViewComboBoxColumn cboreason = new GridViewComboBoxColumn("Reasons");
               
               cboreason.DataSource = pamsContext.GetGrievancesReasons();
               cboreason.FieldName = "reason";
               cboreason.DisplayMember = "Value";
               cboreason.ValueMember = "Key";
               cboreason.Width = 100;
               grvGrievances.Columns.Add(cboreason);
               grvGrievances.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
     

 I have a details changed to track the dirty state of my form which i normally attach via 
  txtReportedTo.SelectedValueChanged+= DetailsChanged;
             

How do i do this with the above ???? As dont see the usual SelectedValueChanged method to call ??

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Dave
Top achievements
Rank 1
Share this question
or