Announcement

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

    Remove auto fit cols from context menu

    We're using Smart GWT 2.2 nightly build from October 1, 2010.

    We _must_ use a nightly build because we had issues with myDataSource.performCustomOperation() that were resolved in a nightly build.

    Since using the new nightly builds, we cannot use:

    Code:
    myListGrid.setAutoFitFieldWidths
    to remove "Auto fit all columns" and "Auto fit" from the header context menu of the ListGrid. These need to be removed from the context menu because they aren't translated into Spanish, and they have unpredictable results (eg. sometimes the columns are just all set to minimum width and don't actually auto-fit to the grid width).

    Is there another way of removing these options from the header context menu? As you can see from the screen shot, using:

    Code:
    myListGrid.setCanSort
    Code:
    myListGrid.setFreezeFields
    Code:
    myListGrid.setCanGroupBy
    will remove other default options from the context menu.

    Thanks,

    Chandra
    Attached Files

    #2
    I just uploaded some Spanish translations for Auto-fit, but I'd still like to be able to remove them from the context menu.

    I tried last night's nightly, still no luck removing them.

    Any ideas?

    Comment


      #3
      In SmartGWT I don't think the API is exposed yet, but very easy to do in JSNI for your ListGridField, just set the property 'canAutoFitFields' to false for your each of your fields.

      Comment


        #4
        Thank you. I'll do that in the mean time.

        Hopefully we'll get the ability to remove this directly in SmartGWT soon............

        Comment


          #5
          You can call ListGrid.setCanAutoFitFields(false);

          Comment

          Working...
          X