I’ve tried just about every combination I can think of now.
The first customer displays correctly but when I click the dropdown to select from the list, every customer in the table is there, I just want the ones from UD20 where Key1 matches Key1 in the memo table
Looks like you’re only pulling back Chacter01.
Either remove that (since you have a DescColumnName and Value Member already set), or add Key1 to the EpiHiddenColumnsAppend.
It would not let me delete Character01 from the DisplayMember, it just automatically put it back again. I added Key1 to the EpiHiddenColumnsAppend but still getting all the customers from UD20 back.
I’m thinking that maybe Key1 (The ProjectID) where the memo is being entered, is not being set. It should be looking in UD20 to return all the Character01s where Key1 (The ProjectID in UD20) = Key1 the ProjectID in the memo. If that makes sense
Try creating a button to compare the results of UD20.Key1 and Memo.Key1 to make sure they’re actually the same.
If they’re not, you may have to massage the data with .Trim() to remove whitespace or something else.
Just as another note–did you create that drop down method using the event wizard or did you copy+pasta mine and change the name?
If the latter, you’ll want to add this in the initialize:
this.epiComboC1.BeforeDropDown += new System.ComponentModel.CancelEventHandler(this.epiComboC1_BeforeDropDown);
And this in the destroy:
this.epiComboC1.BeforeDropDown -= new System.ComponentModel.CancelEventHandler(this.epiComboC1_BeforeDropDown);
You are a star Aaron, I added the initialize and destroy code and hey presto! it worked!
Thanks for spending so much time on this with me. I owe you a nice drink some time
Also just for the record, if your SearchFilter starts with CodeTypeID Epicor will set the DropDownStyle Automatically to DropDownList. So you dont have to set it in Code anymore.
Hi guys, @hmwillett , @hkeric.wci@josecgomez
Just a quick question. Everything is working great except for one small problem. When we save the Project Customer as the one we select from the dropdown list, it reverts back to the entry at the top of the list the next time we open the memo. I have bound the control to the ProjectCustomer field in MemoUD table, but it seems the list generation for the combobox is overwriting the content every time. Is there a way to display the value that was saved, it is after all in the list, just not always at the top. I have experimented a bit with the properties but had no luck as yet.
I figured it out eventually. I needed Character01 in the ValueMember, not Key1. As Key1 is the Project Number it obviously did not exist in the Project Customer list. Seems fine now.