Filter by Grid in DAX 4.0
Recently I was given a challenge for a need in DAX 4.0. Basically there is a new filter type in 4.0 called "Filter by Grid".
This filter can be applied to any data grid within 4.0 by either clicking on the toolbar icon, or by pressing "Ctrl+G". Well I thought this would be simple enough, maybe even a property in the Grid, datasource, or evern form. I looked and looked, and could not find anything.
So I started to dig deeper to see if this was a method of some sort, on all of these objects, still nothing. Well after scratchin my head, wondering why such a simple (seemingly) task was bafling me.
So I turned on the code profiler, appiled the filter, and then walked through the code profiler out put. I did come across something that looked promising with the ClassFactory.QueryRunClass() method, but still could not get it to work properly. I even started to look at overriden the SysSetupFormRun class and making sure I applied the "Filter by Grid" there. That would work, if I knew for sure what made the filter appear with code.
So I did all of this in about an hours time and had to move on, but I thought it was intersted that something seeming so simple has yet to find an answer. Of course nothing is on the web about this, and so I will continue on with the challenge until I figure it out, or the person who challenged me tells me. Obviouslly he knew this was Much harder than it seemed.
Check back soon, as when I find the answer I will post it!
P.S. I say much harder, but it still may be a simple answer. I could easily have overlooked something... still strange that this would not be an easy piece of code to run that would then apply to the active grid....... any comments are of course welcome.
Find a job at: www.DynamicsAXJobs.com
This filter can be applied to any data grid within 4.0 by either clicking on the toolbar icon, or by pressing "Ctrl+G". Well I thought this would be simple enough, maybe even a property in the Grid, datasource, or evern form. I looked and looked, and could not find anything.
So I started to dig deeper to see if this was a method of some sort, on all of these objects, still nothing. Well after scratchin my head, wondering why such a simple (seemingly) task was bafling me.
So I turned on the code profiler, appiled the filter, and then walked through the code profiler out put. I did come across something that looked promising with the ClassFactory.QueryRunClass() method, but still could not get it to work properly. I even started to look at overriden the SysSetupFormRun class and making sure I applied the "Filter by Grid" there. That would work, if I knew for sure what made the filter appear with code.
So I did all of this in about an hours time and had to move on, but I thought it was intersted that something seeming so simple has yet to find an answer. Of course nothing is on the web about this, and so I will continue on with the challenge until I figure it out, or the person who challenged me tells me. Obviouslly he knew this was Much harder than it seemed.
Check back soon, as when I find the answer I will post it!
P.S. I say much harder, but it still may be a simple answer. I could easily have overlooked something... still strange that this would not be an easy piece of code to run that would then apply to the active grid....... any comments are of course welcome.
Find a job at: www.DynamicsAXJobs.com
5 Comments:
Hmmm, interesting....
Columbus IT claims to be the first as well (started may 1st too).
Considering timezones, i think they are right ;-)
Bernard.
Oops, forgot the link.
www.columbus.nl
This comment has been removed by a blog administrator.
Actually, I was sure from the start that it's just a second FIXED Row in the FormGridControl.
At least it looks this way very much.
But I didn't find any method or property on this class in SystemDocumentation\Classes\FormGridControl
So I join you know wondering about what this feature is really built on. :)
I was trying to figure out how to turn the "Filter by Grid" on in code, and I figured it out. Call the .task method on the form with a parameter of 2855 after the grid is selected.
Anything that extends FormRun can make the call to .task(2855). Unfortunately, I can't trace it back up to FormRun since that's a system object.
I'm still interested in learning how it actually works so that I can set it up as a user setting per grid.
Post a Comment
<< Home