Announcement

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

    tallBaseStyle of listgrid

    What can we do if a listgrid has a baseStyle but we also want to use tallBaseStyle for when the user decides that they want to set fixedRecordHeights to false?

    Code:
    tallBaseStyle [IR]	type:CSSStyleName, defaultValue: "cell"
    	
    "Tall" baseStyle for this listGrid. Only applies if ListGrid.baseStyle is set to null.
    
    If baseStyle is unset, this property will be used as a base cell style unless the grid is showing fixed height rows with a specified cellHeight that matches ListGrid.normalCellHeight, in which case ListGrid.normalBaseStyle will be used. Note that in Internet Explorer if ListGrid.fastCellUpdates is true, tallBaseStyle will also be used even if the cellHeight matches the specified normalCellHeight for the grid.

    #2
    The intention here is that you specify "normalBaseStyle" as well as "tallBaseStyle" then tallBaseStyle gets used if fixedRecordHeights is false or if the cellHeight doesn't match the expected value.
    As such you'd leave baseStyle unset.

    If you actually have baseStyle set, but you know you want to use this pattern, you could do something like copy it across to the 'normalBaseStyle' attribute and expicitly null out baseStyle in your ListGrid on init to get this behavior. Or you could override getBaseStyle to return whatever is appropriate for your usage.

    Comment


      #3
      Not quite certain but when recordBaseStyleProperties is used, would the baseStyle be changed to the value passed in?

      Comment


        #4
        Not sure exactly what the question is here, but the behavior is as follows:

        - getBaseStyle returns the base style for each cell
        - the default implementation will (in short) check whether record[this.recordBaseStyleProperty] is specified on the record, and if so return it.
        - if not, it will return this.baseStyle if set
        - if that is null, it will return this.tallBaseStyle or this.normalBaseStyle depending on fixed record heights and specified cell height

        So you can override getBaseStyle to do something entirely custom, or you can work within this default behavior by specifying appropriate baseStyle, tallBaseStyle, normalBaseStyle grid attributes and potentially record[recordBaseStyleProperty] to get the appearance you're after.

        Comment

        Working...
        X