![]() ![]() Once you understand how the data objects relate you can configure a similar setup in your actual application. Please start a blank project and follow these steps. Data bound so I can update the Id in the main table.Highlight the item in the dropdown list.Obviously this is not the way to do it, but I have no clue what I need to do to get the combo box to display what I need: (If I remove the data binding it shows the Name on from load as well.) Although the corresponding name is still not in the list. I also notice that on form load it shows the Id, but if I move to the next record it shows the name. Relation, but when it fills the list it only sees one record. So it looks like the control is able to use the (Because there is only one item in the list, the first Number/Name). It does not give me the list I want, it does show the name and does not highlight the related item in the dropdown list. If I set the bsEmployee.DataSource to bsMaster and bsEmployee.DataMember to It probably needs a relation so the control will get the correct values on form load It then gives me the list I want, but does not show the name and does not highlight the related item in the dropdown list. If I set the bsEmployee.DataSource to bsMaster.DataSource (ds) and bsEmployee.DataMember to I also set the relation for table(0) and Table(2). I set the relation for table(0) and table(1) Table(2) holding the Number and Name column. Table(0) holding the among others the Id column. My understanding is that I need to set a couple of things for the combo box control so it will show the Name instead of the Id and set the data source for the control to get the list and displayed value I need: So I use that to set the control(s) databinding:Ĭ( New. The bindings source (10k records) has the Id. Name that is related to the Id and gives me a list of the names to choose from. On the form I want to use a combo box, that is bound to an Id, but shows the The project I am working on has a form using a binding source (bsMaster) taken from an sql server database. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |