eric_h - Tuesday, July 26, 2011 7:16 PM:
We currently have a situation where we would like columns on the search grid to dynamically appear based upon what subclass is picked. Basically any non-hidden properties would be exposed but only when they fall within the classpath as defined for the properties.
It would be extra-nice if we could somehow tie a list to the class structure instead of searching the 'Type' field as a string value. A drop-down list would be nice.
So in an ideal world, we would choose our subclass / type via a drop-down list in the search grid, and then any properties tied to that subclass and had Hidden unchecked would then display columns dynamically.
I guess I would imagine loading all non-hidden properties, but setting as 'display: none' via CSS for anything not in the classpath, and then dynamically changing the CSS upon a Type selection based upon the class selected. I understand the grid is probably a .NET control and don't know how it handles styling. My guess is that I could not do this via flipping the display property.
I was given a custom search sample, but after installing I am not so sure this is what we are looking for, though I really didn't give the API a thorough look. It would just be nice to use the existing search grid, but add this dynamic behavior.
The problem is, by exposing everything that is not set as hidden, is there are enough classes with their own properties that the search grid gets pretty wide and more difficult to use.
eric_h - Tuesday, July 26, 2011 7:23 PM:
Just to clarify that last sentence: There is enough properties that the search grid gets unwieldy. Each subclass has quite a few properties, and displaying them all at once makes for a wide grid. It can also create a distraction.
xueron564 - Sunday, August 14, 2011 8:51 PM:
888xuerong-3:
eric_h - Thursday, July 28, 2011 5:45 PM:
A little update, but I was able to somewhat mimic the desire for a drop-down list tied to classification in the search grid. Just to try, I tried to see if I could change the 'classification' property from a string to a list, but Aras does not allow this to be altered (and I am sure for good reason.) I was aware this could break things, but thought I would check anyway.
So what I did was create a new list that I called 'part_type' where the values matched the values that classification stores in the DB. I created a property called 'Part Type' (part_type) that I expose to the search grid while at the same time hid 'Type' (classification).
I had to synch the new part_type column with the values in classification, but in the future I would like to tie an event/action method so that any time the classification is changed or assigned to a part, it auto-populates that same value in the part_type column. For now I just need to keep them manually synched.
This may be a kludge, but a drop-down chooser for part classification is a near must for the search grid. The next step is to try and see if we can tie this field with dynamically displaying and hiding columns in the search grid based on the classpath these columns belong to. Since you can dynamically hide and show ('insert') columns via right-click menu, the grid control is capable of this dynamic behavior. I just don't know if this can be controlled via JavaScript. But that is the next step. If there is any success, I will update.
Thanks,
Eric
