Announcement

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

    ListGrid.setAlternateRecordStyles(true) does not work

    In version 2.0, setting ListGrid.setAlternateRecordStyles(true) does not seem to be working. I have been using it earlier to show rows in alternating style in order to better read it. Now it only shows white background for all the rows, even though i have set ListGrid.setAlternateRecordStyles(true).

    Has something changed?

    #2
    Could someone answer my question?

    Comment


      #3
      I feel your pain. Have a look at the .alternateGridBody style in the new 2.0 version of /sc/skins/Enterprise/skin_styles.css.

      Brilliantly, they've disabled the ability to use alternating row colors by making it exactly the same as the .gridBody style!

      Such a shame, I mean when they go through all the trouble to actually supply the method on the ListGrid, the two styles...all that code for naught. Who knows why these things happen? An unpleasant upgrade surprise for sure, because moving from 1.x to 2.0 suddenly turns your previously easy to read grid plain old white.

      Comment


        #4
        Originally posted by KenG
        Brilliantly, they've disabled the ability to use alternating row colors by making it exactly the same as the .gridBody style!
        If you're posting looking to get assistance, snide comments like this are not going to help. If this is so critical to you, become a paid customer and expedited patches will be made available. If you're not a paid customer, then be patient. Questions here are answered on a priority basis and we'll get to this accordingly.

        Comment


          #5
          I am a paying customer and it also took me quite some time to find out why the ListGrid.setAlternateRecordStyles(true) didn't work anymore after the 2.0 upgrade.
          I also asked myself the question if making these two css styles the same was done on purpose or by accident.

          If it is was by accident, is there already a patch available for SmartGwtPower users? (we currently have the 17/12/2009 version)

          Comment


            #6
            Originally posted by daviddb
            I am a paying customer and it also took me quite some time to find out why the ListGrid.setAlternateRecordStyles(true) didn't work anymore after the 2.0 upgrade.
            I also asked myself the question if making these two css styles the same was done on purpose or by accident.

            If it is was by accident, is there already a patch available for SmartGwtPower users? (we currently have the 17/12/2009 version)
            We'll look into it and post an update soon.

            Comment


              #7
              Originally posted by daviddb
              I am a paying customer and it also took me quite some time to find out why the ListGrid.setAlternateRecordStyles(true) didn't work anymore after the 2.0 upgrade.
              I also asked myself the question if making these two css styles the same was done on purpose or by accident.

              If it is was by accident, is there already a patch available for SmartGwtPower users? (we currently have the 17/12/2009 version)
              I looked into this and ListGrid alternateRecordStyles is actually functional however the alternate row colors were quite light. The styles have been updated to be darker and will hit SVN shortly. Have a close look at your application and you should notice the alternate rows. If this is not the case, post a screenshot along with details of the SmartGWT build / version you are using.

              Comment


                #8
                It was totally not visible on my screen but by using a 'color picker' I could see that the alternate rows have a slightly different background color FAFAFB (compared to FFFFFF).
                So it does work but the darker styles will definitely be an improvement.

                Comment


                  #9
                  Hey, I was just helping your customers out. Nobody answered tmp_7's question for 9 months.

                  I think SmartGWT is slick. I'd love to be a paying customer if I can convince my managers that it would be a wise investment. This means, I actually need to produce something that's nice, and useful, in timely fashion. Friendly support would be a nice plus, but I'm not asking for it... really. You have better things to do than answer questions like this for freeloaders like me. In fact, you can count on me NEVER asking a question here. I query some keywords, and if the answer is not here, then I go figure it out. That's how many of us survive.

                  Thanks however for providing a nice place where your potential customers can lean on one another to answer these questions themselves.

                  A follow-up for the previous hint: If you're interested in overriding that .alternateGridBody style, be sure that the .css style sheet that contains your overriding style declaration is loaded after the SmartGWT styles. You can determine the order that web resources are loaded by your client by using Firebug, or Chrome's - Developer > Developer Tools menu.

                  Probably best to just include:

                  <stylesheet src='MyApp.css'/>

                  in your MyApp.gwt.xml file after all the SmartGWT inherits tags, instead of declaring

                  <link type="text/css" rel="stylesheet" href="MyApp.css">

                  in your MyApp.html file. In general, this will help you override ANY style that you don't like.

                  Comment


                    #10
                    Hi Ken,

                    Thanks for your useful info on including the css stylesheet in the .gwt.xml file, because I'm trying to override some other aspect of ListGrid. Unfortunately I find when I remove the
                    Code:
                    <link type="text/css" rel="stylesheet" href="Simple.css">
                    in the .html document and place
                    Code:
                     <stylesheet src='Simple.css'/>
                    in the module file as the last entry I can see in both Chrome and Firebug that the stylesheet is not loaded at all. I did have a hunt around to see if there is a way of determining why this is happening but didn't get any joy. If you have any ideas to help out here I'd be happy to hear them.

                    Thanks

                    Alastair

                    Comment

                    Working...
                    X