Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 04, 2008 10:25 PM by sjnaughton
Dec 19, 2007 04:19 PM|LINK
I've customized one of my pages not to use the templates. I've removed the FilterRepeater and just have one Dynamic Filter on the page. My question is, is there a way to order the contents of the drop down list that the Dynamic Filter creates? Do I need
to create a partial class for that table and do something on the OnLoaded event? Thanks in advance.
Dec 19, 2007 06:43 PM|LINK
That's a great question. I was just about to post that one myself . . .
Dec 20, 2007 01:05 AM|LINK
There currently is no way to customize this. For future releases, we are thinking of having an extra metadata attribute that would let you declare the column to sort on (plus asc/desc). Is there any extra functionality you would like to see in this area?
Dec 20, 2007 01:55 PM|LINK
Well, I started customizing the dynamic filter because I needed a human readable label next to the drop down list, not just the table name. It would be nice to have an attribute for every column and table name so that you could provide your own custom string
that would be displayed in the grid column headers and the filter labels etc.
Dec 20, 2007 02:03 PM|LINK
Although it may not be practical for your solution, one workaround would be to rename the tables in the LinqToSql class. You can click do it directly in the designer.
Dec 20, 2007 02:13 PM|LINK
Dec 20, 2007 02:24 PM|LINK
For some reason, after you rename the tables in your LINQ to SQL diagram, you have to close the diagram and reload it in order for the new names to take effect. The names change in the diagram in real time, however they are not seen programmatically untill
you reload the diagram. The same thing happened to me. I'm afraid it may be similar to the cashing issue in another topic on this forum which we are currently waiting on a work around for.
Dec 20, 2007 07:16 PM|LINK
Thanks for the input everyone,
We already have plans to add extra metadata attributes to let you provide friendlier names for columns and filters, as well as better customization for sorting. They will come in particularily handy if you have an externally created data model that you can't
May 23, 2008 02:54 PM|LINK
So I was wondering if this issue has been resolved yet.
I am trying to sort a automatically generated dropdown in an DynamicGridView, and would love to know if there is a metadata attribute I can use to do that.
Right now it is sorting by the column's ID field rather than its Name field.
May 23, 2008 03:05 PM|LINK
Marcin in the third post in this thread just said there is no way to do this currently (and I suspect in the verion that will RTM) to do the sort. However Marcing is also doing some samples see
here one sample is Extending the FilterRepeater which may give us insite as to how we could do it our selves.