This question is locked. New answers and comments are not allowed.
How can I get the filter parameter to display the column name, rather than the property name, to which it is bound? I can't want to expose my property names to a user. Not only because it doesn't support localisation and multi-word properties but in several places I use proxy class with auto generated property names. I can't expose Ash_&pc_Ad324553kjfds5 as a filter parameter to a user.
Thanks.
Thanks.
4 Answers, 1 is accepted
0
Hi Adam,
RadDataFilter does not have a notion of a column name, since it does not have columns. So I am not sure what this column name is and where does it come from.
RadDataFilter supports the DisplayAttribute.ShortName data annotation.
So you can write thin on top of your property:
Sincerely yours,
Ross
the Telerik team
RadDataFilter does not have a notion of a column name, since it does not have columns. So I am not sure what this column name is and where does it come from.
RadDataFilter supports the DisplayAttribute.ShortName data annotation.
So you can write thin on top of your property:
[Display(ShortName="Something")] I hope this helps. More on data annotations you will find here.
Sincerely yours,
Ross
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
david mcintyre
Top achievements
Rank 1
answered on 12 May 2011, 08:32 PM
Hi Ross, does the raddatafilter support localization for the ShortName? If I set the ResourceType then the entire Display attribute is ignored by the filter, and the property name is displayed. Here's my (nonworking) metadata:
Or is the problem w/ my resource file? My resource file is server-side, an embedded resource, "Do not copy".
[Display(Order = 1, ShortName = "ItemID", ResourceType = typeof(MyAppResources))]
[Display(Order = 1, ShortName = "Item ID")]
public int ItemID { get; set; }
Or is the problem w/ my resource file? My resource file is server-side, an embedded resource, "Do not copy".
0
Hi david mcintyre,
Ross
the Telerik team
As I mentioned in my earlier post, RadDataFilter does support ShortName. You can check this by assigning a hard-coded string.
Most probably the problem is connected with your resources.
Ross
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
david mcintyre
Top achievements
Rank 1
answered on 16 May 2011, 01:42 PM
But I don't want to hardcode it like that, i need a localized version. Can the filter support this?