다음을 통해 공유


DynamicControl.DataFormatString 속성

정의

필드 값의 표시 형식을 지정하는 문자열을 가져오거나 설정합니다.

public:
 property System::String ^ DataFormatString { System::String ^ get(); void set(System::String ^ value); };
public string DataFormatString { get; set; }
member this.DataFormatString : string with get, set
Public Property DataFormatString As String

속성 값

필드 값의 표시 형식을 지정하는 서식 문자열입니다. 기본값은 필드 값에 특별한 서식이 적용되지 않음을 나타내는 빈 문자열("")입니다.

설명

컨트롤에 DataFormatString 표시되는 DynamicControl 값에 대한 사용자 지정 표시 형식을 지정하려면 이 속성을 사용합니다. 속성이 DataFormatString 설정되지 않은 경우 필드 값은 특별한 서식 없이 표시됩니다.

기본적으로 서식 문자열은 속성이 .로 설정된 경우에만 필드 값에 ModeReadOnly적용됩니다. 편집 모드에서 필드 값에 서식 문자열을 적용하려면 속성을 true.로 설정합니다ApplyFormatInEditMode.

속성을 사용하여 DataFormatString 지정하는 표시 형식은 컨트롤의 이 인스턴스와 관련이 있습니다 DynamicControl . 데이터 모델에 적용하고 생성자에서 명명된 매개 변수를 DisplayFormatAttribute 설정하여 전체 애플리케이션에서 데이터 필드의 DisplayFormatAttribute.DataFormatString 표시 형식을 변경할 수도 있습니다. 자세한 내용은 동적 데이터 ASP.NET 참조하세요.

적용 대상

추가 정보