Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SelectItem Disabled Entries

    SmartGWT 3.0 / FF 10.0.4

    I can get entries to be disabled in my SelectItem. But sometimes the first disabled entry is unformatted (ie. no CSS styling is applied).

    Any idea why?

    Code:
            myCmb = new MySelectItem("type", "Config", 180, false);
            myDs = new DataSource();
    	myDs.setClientOnly(true);
    	myCmb.setOptionDataSource(myDs);
    
    for(String entry: entries) {
    Record record = new Record();
    record.setAttribute("type", entry);
    						
    if(enabledList.contains(entry)) {
      record.setAttribute("enabled", true);
    } else {
      record.setAttribute("enabled", false);
    }
    							
    myDs.addData(record);
    }
    Last edited by rle125; 18 Oct 2012, 14:38.

    #2
    Probably the first row is being styled with the Selected suffix and your skin lacks a style for the combination of Disabled+Selected.

    Comment


      #3
      SelectItem Disabled Entries

      Its actually the 2nd row, but the 1st disabled row.

      Firebug shows the bad disabled row as pickListCellDisabledDark and the good disabled row as pickListCellDisabled
      Last edited by rle125; 18 Oct 2012, 14:42.

      Comment


        #4
        We didn't quite parse that, however, in general, you can use Firebug to watch what CSS style is being applied to that row. Some combination of your settings, your overrides and your skin is creating a situation in which the style applied to the row isn't defined.

        Comment


          #5
          Looks like you added more information - good - so the "Dark" suffix comes from having listGrid.alternateRecordStyles enabled for the PickList used by the SelectItem. You can either turn that off, or add a definition of the style with the Dark suffix.

          Comment

          Working...
          X