PDA

View Full Version : custom trigger field that works in editor grid & uses hidden field as value



rgeib01
27 Oct 2010, 6:51 AM
I have created a custom trigger field that is to be used in my editor grid. When trigger is clicked, a window pops up that has a list of items the user can choose from (window is an existing interface in our app, one that was not developed with extjs). Once the user selects items and then clicks the OK button, I need to somehow display the list of selected names (as a comma delimited string) in the editor grid but store the list of ids. Does anyone know how to do this? I've gotten the trigger field created, and it works if I'm just storing AND showing ids. It's when I add in the need for showing the names and storing ids that I get stuck. I know ComboBox uses a hidden field, and I feel like I should do something similar, but I don't know even where to begin to try to emulate that code. Can someone point me in the right direction or give me an idea as to what to do here?

One thing I've tried is to not use a hidden field and instead have an extra (hidden) column that holds the value. I don't like this way of doing it for reasons beyond the scope of this thread, but even it isn't working. I keep running into an issue with trying to modify the record on select. I have both the names and the ids at this point, but at some point those ids are lost - and I can't figure out why. And then I get this error: "object invoked has disconnected from its client."

Please help.