Announcement

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

    Change label title in Select Date Range modal window?

    Hi folks,

    is it possible to change permanently the label title of From and To in
    the Select Date Range modal window of a ListGrid Filter?

    Thanks in advance!

    #2
    If you define your own DateRangeItem, you can change the toTitle and fromTitle and then use setFilterEditorType() for the date field you have.

    Comment


      #3
      So, there is no way to change the standard window?!

      Comment


        #4
        No, getFilterEditorType() would have to be overridable I believe for you to get at it.

        Comment


          #5
          I tried but it did not work.

          Code:
          public class OwnDateRangeItem extends DateRangeItem {
          
          }
          Code:
          ListGridField filebusdt = new ListGridField("filebusdt");
          OwnDateRangeItem dateRangeItem = new OwnDateRangeItem();
          dateRangeItem.setFromTitle("After");
          filebusdt.setFilterEditorType(dateRangeItem);
          I get an error message:
          Uncaught exception escaped : com.google.gwt.core.client.JavaScriptException
          (TypeError): this.toField.canvas is undefined
          Last edited by GWTDummies; 3 Jul 2010, 12:13.

          Comment


            #6
            Hi iso,

            any ideas? Thanks!

            Comment


              #7
              Originally posted by GWTDummies
              Hi folks,

              is it possible to change permanently the label title of From and To in
              the Select Date Range modal window of a ListGrid Filter?

              Thanks in advance!
              Try this :

              Code:
                  public static native void setDateRangeItemTitle(String fromTitle, String toTitle)/*-{
                      $wnd.isc.DateRangeItem.addProperties({fromTitle: fromTitle});
                      $wnd.isc.DateRangeItem.addProperties({toTitle: toTitle});            
                  }-*/;
              Sanjiv

              Comment


                #8
                WOW! It works!
                Thanks a lot!
                Last edited by GWTDummies; 5 Jul 2010, 23:40.

                Comment

                Working...
                X