[CLOSED] Is there any way to "disable" the FieldSet title label?

  1. #1

    [CLOSED] Is there any way to "disable" the FieldSet title label?

    Hi,

    I'd like to be able to make the FieldSet title look disabled. Alternatively, if you could suggest how to apply a CSS class to customize the appearance of a disabled FieldSet as a whole, that would be great, too. Specifically, its background shouldn't change when disabled, only its controls should become disabled accordingly.
    Last edited by Daniil; Jul 31, 2012 at 8:01 PM. Reason: [CLOSED]
  2. #2
    Hi,

    I would try this:

    Example
    FieldSet1.items.each(function (field) {
        field.disable();    
    });
    FieldSet1.header.addClass("x-item-disabled");
  3. #3
    Thanks Daniil! What's the server equivalent of

    FieldSet1.header.addClass("x-item-disabled");
    This server code doesn't work:

    FieldSet1.SetTitle("New title", "x-item-disabled");
    Edit in: Never mind, I put the CSS logic you suggested in the FieldSet AfterRender listener so I'm good. Thanks for the working solution! Please close down this thread.
  4. #4
    The solution AfterRender won't work for already rendered FieldSet.

    So, if you will need to disable an already rendered FieldSet, you can use this code:
    FieldSet1.Call("header.addClass", "x-item-disabled");
  5. #5
    Quote Originally Posted by Daniil View Post
    The solution AfterRender won't work for already rendered FieldSet.

    So, if you will need to disable an already rendered FieldSet, you can use this code:
    FieldSet1.Call("header.addClass", "x-item-disabled");
    I see. I need AfterRender handler to fire only once so this should be OK. I don't rely on it after that.

Similar Threads

  1. [CLOSED] How does "MaskCls" work for "AutoLoad" mask in panel control
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 19, 2012, 12:09 PM
  2. Replies: 5
    Last Post: May 02, 2012, 5:37 PM
  3. Replies: 7
    Last Post: Dec 13, 2011, 2:39 PM
  4. Collapsed="true" on FieldSet
    By bright in forum 1.x Help
    Replies: 0
    Last Post: Nov 09, 2011, 7:26 AM
  5. Replies: 4
    Last Post: Oct 11, 2011, 2:42 AM

Tags for this Thread

Posting Permissions