Ticket Q296200
Visible to All Users
Duplicate

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

How to colorize (make red) the asterisk symbol accompanying captions of required fields

putting red asterisk near a required field

created 14 years ago

Hi
I attached a pic with 2 red asterisks near the required fileds.
How should I write that in XAF ?
Thanks

Show previous comments (6)

    Thnaks Michael. Works Perfect !!!

      Hi
      Like the example you gave me , I'm trying to insert a label on the right side of the control
       if (editor.Id=="PenaltyTime")
                      {
                          Table table = new Table();
                          table.Rows.Add(new TableRow());
                          table.Rows[0].Cells.Add(new TableCell());
                          table.Rows[0].Cells.Add(new TableCell());
                          Control baseControl = base.CreateCaptionControl(templateContainer);
                          table.Rows[0].Cells[0].Controls.Add(baseControl);
                          Literal anchor = new Literal();
                          anchor.Text = string.Format("<span align='right'>min.</span>",
                                  templateContainer.DetailViewItem.Caption);
                          table.Rows[0].Cells[1].Controls.Add(anchor);

      result = table;
                      }
      so that the word "min." will be on the right side of the penaltytime control dropdown list but it is still on the left side. (see pic attached)
      Thanks

      Dennis Garavsky (DevExpress) 14 years ago

        Hello Golan,
        Your screenshot indicates that you are inserting your label in an incorrect position within the controls hierarchy.
        You should definitely insert your label higher by the hierarchy (into one of the parents of the editor.Control).
        I suggest you learn more about the Table, TableRow and TableCell classes in MSDN to see how it can be accomplished.
        Let me know if I can help you further with DevExpress products.
        Thanks,
        Dennis

        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.