Man... I am adding my vote to get this to work ASAP!
I just can't believe Telerik can't get the Fields() function to accomodate this.
I mean... this is practically the same concept that we use on RadGrids when we declaritively assign a data field to a column. If we want the field 3 layers up or down the chain, we just use "object1.object2.FieldName". Somehow RadGrid knows what that "text" representation of a object/field combination should be. I have to assume behind the scenes it is taking that "text" and figuring out the actual object/field from it...no matter how many layers it is.
It takes the Fields() function from a great idea to practically useless (unless you are creating reports with only flat objects). Telerik has a wonderful ORM. Whether I choose to use the OpenAccessDataSource directly or use an ObjectDataSource against some ORM objects, there ARE going to be layers. The minute I have any layers, the Fields() function pretty much can't ever be used, because at some point the needs of the report will be such that fields from the reference objects are needed and the Fields() function will blow up. So, you are stuck designing a solution that can accomodate all fields (which means Fields() can't be used).
Since Telerik can't yet support any type of auto/user sorting on fields (or some out of the box mechinism for the user to chose which field(s) to sort by), I was coming up with my own solution based on this concept
. I wasn't doing it exactly like that, but similar principles. I was creating my own function that returned the sorting values for a datasource used in a "sortby" parameter. Those "values" were the "field names" that you would use if you wanted to sort the report normally. So, in my sorting setup, I used something like:
This works great!!!
As long as my datasource pulls the "field names" (presented in a dropdown), that one sorting expression can accomodate an unlimited # of user sorts.
However, this ONLY WORKS for the TOP
level of fields!!
If you reference ANY sub object, the Fields() function blows up.
So, my one nice expression that should be able to handle anything is now useless.
I have to list out 20 expressions...one for each possible sort... testing the "text/value" and assigning the field myself.
Such a PITA!!
So much so.... that I just say screw it.
Totally not worth the effort when all this could be avoided if the Fields() function just did what it is supposed to do.
If we aren't going to have out-of-box user/sortable functonality, can we PLEASE at least get the Fields() function working?
Pretty sure Telerik could just copy/paste the code for how RadGrid or any of the other bindable objects handle it when a layered object is referenced as text.