Ticket Q416778
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Conditionaly set DetailViewItem's Caption

Change the label of a Property at run time

created 13 years ago

Hi,
I have a class, SpotByMonth that has this property, Year, Month, and 31 propertys like Day1, Day2… to Day31.
I need to change the label o Day1 to Day31 to the corresponding DayOfWeek.
Example:
In July 2012
Day1 => We
Day2 => Th

Day30 => We
Day31 Visible=False

I copy part of the class, I can change the backcolor, but i coudn't change the caption
Regards

Dim _01 As Integer

<
Appearance("PintarColumnas1", Criteria:="WE01=True", FontColor:="White", BackColor:="Blue")> _

<
Custom("Caption", "01")> _

<
RuleRange("ReglaRango.PautaDetalle.Dia1", DefaultContexts.Save, 0, 100)> _

Public Property D01() As Integer

Get

Return _01

End Get

Set(ByVal Value As Integer)

SetPropertyValue(Of Integer)("D01", _01, Value)

End Set

End Property

Public

ReadOnly Property WD01 As String

Get

Return GetLetterWeekDay(1)
End Get

End Property

Answers

created 13 years ago (modified 13 years ago)

Hello,
I am afraid you cannot use the ConditionalAppearance module to accomplish this task.
Instead, you can implement a ViewController that will access the editor's caption control and customize it as you require.
Take special note that this solution will vary against the platform. For instance, here you can find solutions for the Web platform:
Change font and caption for editors in detail view on the Web
Change caption at runtime
And here you can find a solution for the WinForms counterpart: Conditionaly set DetailViewItem's Caption.
I hope you find this information helpful.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.