DataGridView as Pick List
Brady Kelly <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Organization | Chase Software |
| Message-ID | <[email protected]> |
I'm trying to quickly use a DataGridView as a pick list for recipients. I include an IsSelected flag in my Contact struct, and use a List<Contact> as the data source for my grid. Now, when I click the CheckBox column bound to IsSelected, I raise an event and the parent form re-builds the actual text of the To field based on which contacts have IsSelected set. There seems to be some kind of mismatch in updating, because when I first show my pick list and select a contact, the event fires but no contacts are displayed (I suspect because the data source is not yet updated.) Then, when I show the pick list again, and DESELECT the same contact, the event fires and the name is now displayed. Any quick advice? I'm not trying to do a major work here, it's just for a test UI but selecting multiple contacts is essential.