I have a combobobox on my form, and I use the following code to populate the data from SQL Server:
cbname.DataSource = DSAssetName.Tables(0)
cbname.DisplayMember = "IDWLNAME"
cbname.ValueMember = "FIDWID"
I need the value specified in the value member for the reporting section of my app to work. This all works great and everything, but I need to add another item in the combobox "SELECT ALL", and when chosen, sends a -1 to my stored procedure so the report can show all the data. I tried manually putting "select all" in the combobox before the datasource gets set, but then it only gets overridden. Trying to add it afterward give me the error "Items collection cannot be modified when the DataSource property is set." Anybody know a good trick that can solve the problem?
Thanks