Announcement

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

    ListGrid Autofit initial contents

    Hi,

    I want the ListGrid to autofit according the contents given in setData. So I added Autofit.HORIZONTAL property. However it is not performing the fit. The code is:
    Code:
    ListGrid gd = new ListGrid();
    gd.setWidth(100);
    gd.setHeight(400);
    gd.setAutoFitData(Autofit.HORIZONTAL);
    gd.setData(myrecords);
    RootPanel rp = RootPanel.get("mainPanel");
    rp.add(gd);
    However when i resize using mouse, the columns are getting adjusted accordingly. How to autofit the grid according to initial contents?

    VERY URGENT, so plz reply :D

    Thanks,
    Venu

    #2
    no replies?

    what the hell? no replies? where are you, isomorphic?

    Comment


      #3
      Chill out..this is the thanksgiving weekend. Cursing will not help your cause.

      Comment


        #4
        Take a look at this thread. http://forums.smartclient.com/showthread.php?t=8547. AutoFitData isn't intended to do what most people expect it to do. An alternative technique (not very simple) is described in that thread. I haven't tried it myself yet, but if you're in a hurry give it a try.

        Comment


          #5
          sorry and thx

          oh sorry, i forgot about the thanksgiving. thanks for the help ppl. seems like i can't autofit contents now :(
          However... belated happy thanksgiving....enjoy... god bless everyone.

          Comment

          Working...
          X