View previous topic :: View next topic |
Author |
Message |
funs.tummers
Joined: 09 Oct 2007 Posts: 13
|
Posted: Wed Jan 23, 2008 2:05 pm Post subject: Re-initialize control |
|
|
Hi,
I have created a ComboBox celleditor. On a celleditor there is an event called "InitializeControl" . I use this event to fill the combobox with the values I need. After the user picks a value from this combobox, I want to set content of the combobox again. Or as a alternative, everytime I want to access the items in the combobox, these items must be get from somewhere (in my case some kind of rulesengine). |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Jan 23, 2008 11:00 pm Post subject: |
|
|
Rather than adding individual items to the ComboBox in the InitializeControl you might be better off creating a BindingList (System.Collections.Generic.BindingList) with your data in it and setting this as the ComboBox DataSource. Then you can change the values in the BindingList and all of the ComboBoxes bound to it will automatically update. _________________ Infralution Support |
|
Back to top |
|
|
funs.tummers
Joined: 09 Oct 2007 Posts: 13
|
Posted: Thu Jan 24, 2008 11:08 am Post subject: |
|
|
Don't you mean the System.ComponentModel.BindingList?
But thanks for the hint, it brings me much closer to the solution I'm looking for. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Jan 24, 2008 9:45 pm Post subject: |
|
|
Oops sorry - it does live in System.ComponentModel _________________ Infralution Support |
|
Back to top |
|
|
|