We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

DataGrid ComboBox to cause TextBox enable/disable

Hi. I have implemented the custom ComboBox column as described in the FAQ which accepts a delegate to notify subscribers of "selected index changed" events. I have also implemented the TextBox which fires the CheckEnable event during repaints to set it's enabled/disabled status. My problem is that when the user selects a new value in the ComboBox I need the TextBoxes to set their enabled/disabled state immediately according to the selection in the ComboBox. At the moment I have got them to do this when focus moves away from the ComboBox, but this is not quite the behaviour I was after. I have tried invalidating the DataGrid to force a repaint but this does not work. I have also tried reading the value of the ComboBox during the CheckEnabled event handler but this simultaneously affects ALL TextBoxes in the DataGrid. Any other suggestions? Also, can anyone recommend a book that goes into the kind of detail required to do this kind of work? I haven't seen anything even remotely as detailed as the excellent FAQ on this site. Thanks Kevin Hector

Live Chat Icon For mobile
Up arrow icon