This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Howdy All, I have a database with some tables in it: Lots, Departments and Divisions. and that a department may or may not have 0 or more divisions associated with it... With the lot record having a Department and a Division ID in it... The concept is that a Lot will always have a department and may or may NOT have a division, even if the department listed for it has divisions under it, a lot may not need one, the division is truely an option for the lot... The model correctly produces a Department object with a Divisions collection as expected, and the Lot entity with the Department and Division Ids. So now on to the windows form that I'm trying to implement... When a user selects a department I want a combobox that lists the divisions associated with that one and in addtition to that I would like at the top of the list a "None" or "N/A" option in the combobox... I was thinking of one solution is to add a "dummy/psuedo" record of "None" for every department into the Divisions table, but to me that clutters up the divisions table with alot of wasted records ( not that space is an issue :-) ) So my question to you all, is there a better way to insert this option into the combobox /departments-divisions list/colelction in code. before I set the combobox' databinding I was thinking of adding a dummy record/entity into the department's divisions collection, but wasn't sure how to go about that tasks... The end result is that for a single Lot, to have a department and possibly a division if needed. Is there a better way to get there from here??? This is all in Windows desktop aplication written in VB.Net, using Lightspeed 4.0 Thanks in adavance, Kevin Orcutt GIS Developer/Consultant City of Cincinnati - Cincinnati Area GIS (CAGIS) (513) 850-1335 (cell) Kevin.Orcutt@cincinnati-oh.gov www.cagis.org |
|
|
Normally I would just add the "magic value" option to indicate no selections as an extra option for the UI and handle that accordingly for your selection code. I dont think you would want to add this in to the database.
|
|