Announcement

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

    listgrid filter editor date range

    Is there any way to validate the from and to values? In cases when from is later than to date, I want validation for it

    #2
    The easiest way to do this is to implement listGrid.filterEditorSubmit and return false if the date range is invalid, also showing the error an error alert (eg isc.warn()). You could also catch the problem on the server and return a general error (status = -1) with an error message, which will be shown via isc.warn() by default.

    Comment


      #3
      Ok.

      Wouldn't a built-in validator make sense for this issue?

      Comment


        #4
        Not really, in general validators do not apply to search criteria, only saving.

        Comment


          #5
          Fair enough.

          Another question regarding filter editors:

          Run the sample code using Feature explorer link to gain css

          In build 8.x 09-07, you'll notice that the filter editors line up with the listgrid columns.

          In build 8.1.x 09-07, this is not the case. The filter editors are slightly to the right. This only happens when styleName is set on the listgrid - even with an empty "".

          If you need snapshots, please let me know

          /isomorphic/system/reference/SmartClient_Explorer.html#replaceStyle

          Code:
          isc.ListGrid.create({
              ID: "countryList",data: countryData,
              width:500, top:50,
              fields:[
                  {name:"countryName", title:"Country"},
                  {name:"capital", title:"Capital"},
                  {name:"continent", title:"Continent"}
              ],
              showFilterEditor: true,
              filterOnKeypress: true,
              autoFitMaxRecords: 10,
              styleName: "myHighGridCell"
          });

          Comment


            #6
            It looks like, depending on the skin, this would impose a border on the filterEditor but not the ListGrid body. This is not something we consider a valid styling option - it doesn't look good and it would be spectacularly difficult to reconcile the 1px difference in scrolling region between the filterEditor and grid body.

            Comment


              #7
              What does that mean exactly? That it is a SC bug or we have find out ourselves what style we can use without having this issue?

              Comment


                #8
                That having different size borders on the LG body vs filterEditor is not supported, and glitches from doing this are not considered bugs.

                Comment


                  #9
                  Makes sense. But why the different behaviour between the two builds? You mentioned different skins - there's skin differences?

                  Comment


                    #10
                    Yes, if a skin did not have default borders and you switched to a style that also did not have borders, then you would not create a difference in borders between the filterEditor and ListGrid.

                    Comment

                    Working...
                    X