On the Work Queue screen, Job Details tab, I have created a textbox with an epibinding for the WorkQueue.ResourceGrpID and made it read only. It grabs the resource group, once a user selects one, perfectly. Then I created a combobox, with an EpiBinding for WorkQueue.ResourceID, and set the BOName to Erp:BO:Resource to pull in the resources list. Told it to grab the ResourceGrpID as a hidden column and used the code below to filter my combobox.
ResourceGrpID = '?[ResourceGrpID,0]'
Problem is that when I change the resource on my combobox it wants to change the value in the ResourceID column on my workqueues epiultragrid. I don’t want it to change the value, I just want to use it as a value holder for the filter on the grid. I set the column to read-only. I don’t think it’s actually changing the resource but still annoying. Any suggestions or am I going about this all wrong?
The reason I’m doing it this way instead of assigning Employees at the resource level is because we have people that move all over the shop, from one department to another or from machine to machine. Locking them down to one resource is not an option.
If I’ve understood what you’re wanting to do, you shouldn’t be binding the control you want to filter by. That ties the value of it to a specific record.
Leave it unbound, use a wizard to give you an event such as value change or validated, and then manually filter the grid. There’s a lot of help online for working with Infragistics UltraGrids to do that bit of it.
So, I think I follow. You’re saying I should remove the binding from the combobox and create an event on it that when the textbox value changes the epicombox list equals the resources inside the resource group value of the textbox?
Or am I backwards and should create the event on the textbox?
I’ve found a couple threads on how to filter the grid so, hopefully, I’ll be okay there. I had it working once but my combobox wasn’t filtered. I was getting resources from the entire shop. Made the list too long to be efficient.
I think I may be missing a bit from my understanding. The combobox is filtered by the content of the text box, and then the grid by the content of the combobox?
I would use an event on the textbox (or actually a row change or field change event on the EpiDataView more likely) to alter the SearchFilter on the combobox, then an event on the combobox to filter the grid. If you’ve accomplished the first bit ok with your hidden column then ignore that bit.
But if the value of the combobox isn’t meant to change the record in the grid then don’t bind it. Just use the event as I said, and put the code that filters the grid in the event handling.
I’ll be back in the office tomorrow and can see about code examples.
Well I had a stroke of genius. After you said I couldn’t filter the grid using a control that’s bound I came up with another solution. I decided to create a BAQcombo with the phrase below.
[Resource].[ResourceID] as [Resource_ResourceID]
from Erp.Resource as Resource
where (Resource.ResourceGrpID = '[EpiBinding:WorkQueue.ResourceGrpID]')
It’s just the Resource table filtered by the epibinding I wanted.
This allowed me to remove the textbox entirely from the equation. It also gave me a filtered list on my combo, without binding it to anything, so I can use it to filter my grid, and fixed the issue I was having with it changing values on the grid.
Gotta love asking for help just to find the solution an hour later lol.