Questions tagged [displayname-attribute]

Question about Display attribute from System.ComponentModel.DataAnnotations of .Net Framework.

Question about Display attribute from System.ComponentModel.DataAnnotations of .Net Framework.

Display attribute provides a general-purpose that lets you specify localizable strings for types and members of entity partial classes.

48 questions
1
vote
1 answer

Get the DISPLAY_NAME using DATA in android MediaStore

I am building a music player app in android. On clicking a listItem the corresponding song will play and the name of the song will be displayed above the seek bar in a TextView with id "selectedItem". But the data binding is done in…
1
vote
1 answer

LabelFor doesn't work when I use DataAnnotations and DisplayName - ASP.NET MVC

I have a folder called "ModelMetaData.cs" where I have a class called "InspeccioModelMetaData.cs" with these code: [DisplayName("Id")] public string IdInspeccio { get; set; } [DisplayName("Data de caducitat")] public DateTime DataCaducitat { get;…
1
vote
1 answer

Check if a property has a DisplayNameAttribute

I'm trying to verify if a class property has an DisplayNameAttribute. I would like to analise a property and return true or false based on that criteria. This is what i have so far: Sample Class: public class SampleDTO { [DisplayName("Some…
Ricky
  • 2,912
  • 8
  • 47
  • 74
1
vote
1 answer

Can FastMember.ObjectReader take DisplayName into account?

I'm using FastMember.ObjectReader to copy a list of structs to a DataTable, which I then use as the DataSource of a gridview: struct Foo { [DisplayName("title1")] public string Bar { get; set; } } ... var rows = new List(); rows.Add(new…
sashoalm
  • 75,001
  • 122
  • 434
  • 781
1
vote
1 answer

Add display attribute to a variable on runtime

I have a class class demo { public int var1 {set; get;} } I want to add Display attributes on that variable on runtime instead of doing this, class Demo { [Display (Name="Any Name", GroupName= "My Group 1")] public int var1 {set;…
1
vote
0 answers

Localized Display attribute with parameters

In the resource file we defined some strings with parameters, e.g. userDefinedX: User Defined {0}. My question is - is there any way to incorporate that parameter into Display[Name = "userDefinedX", ResourceType = typeof("Labels")] syntax? The only…
1
vote
1 answer

Display name attribute won't work when use MetadataType

I'm Working with ASP.NET MVC 5, database first. But entities in the edmx file, I can't add attributes, as that file will be overwritten every time I update it with database changes. I used MetadataType but Display name attribute won't work…
user401017
  • 38
  • 1
  • 6
0
votes
1 answer

How do I get the display name of a hyperlink that comes from SharePoint in Power Apps?

In a list located in SharePoint, that has over 100 items, there are 5 hyperlink columns, with each entry in it including the URL address and a display name. I am creating a form for this list that allows the user to edit both the URL and the display…
0
votes
2 answers

how to use displayname in xml file

i am a student, i cant find how i giva a name for each of my tests when i am using xml file. when we use datarow we can use displayname="". and then when i will run the tests evry test will have its own name. how can i do it when i use xml file in…
0
votes
0 answers

Localization of DataAnnotations for data validation

I'm using CommunityToolkit.Mvvm. My class is defined in the following way: public partial class User : ObservableValidator { ... [ObservableProperty] [NotifyDataErrorInfo] [Required(ErrorMessageResourceName =…
537mfb
  • 1,374
  • 1
  • 16
  • 32
0
votes
0 answers

Trying to configure OpenLDAP users with a display name in OpenLiberty

I am using OpenLiberty v21. I have configured a federated repository that has a participatingBaseEntry (my OpenLDAP repo). I am trying to figure out the correct way of configuring the OpenLiberty server.xml such that my user's from my LDAP will use…
0
votes
1 answer

B2C: is there a way to avoid displaying Email Address twice?

As per screenshot I am trying to remove 'Email Address' the first time that it appears, not the one within the text box, the placeholder. I have tried to remove DisplayName, or using localization, but everytime both are removed and not only one. Is…
0
votes
0 answers

Exchange 2019 - script to change the display name

We have the policy to create AD users in format of FAMILY NAME Given name, so my name appeared as BARANYI Peter (btw: this is the standard Hungarian format :) ). Now the management asked us to change the Display name to Given name FAMILIY NAME, so…
0
votes
0 answers

Using Test displayname with DynamicDataDisplayName in MSTest

[TestMethod("My Test Name")] can be use to change the name of a test in MSTest. DynamicData attribute can be used to run the test on a collection of object where you can customize the datadisplayname for each run. Unfortunately, when you try to use…
0
votes
0 answers

How to get a displayname attribute when assign values to a property

I have the following property class public class UserModel{ public string Name {get;set;} [DisplayName="Document Name"] public string DocumentName {get;set;} [DisplayName="Terms Usage"] public string TermsUsage {get;set;} } i…
deanpillow
  • 121
  • 1
  • 10