• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Grid filter ux

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Grid filter ux

    Sencha provides a ux called FiltersFeature. I have this working just fine in one of my grids, but that grid loads all it's data and is a local filter. I have another grid that is a remote load with the paging toolbar option. You have properties for vvOut called applyPaging and applySorters. Do you happen to have one to applyFilters? If you don't, this is the unique data that is passed to the RPG:

    filter[0][data][type] string
    filter[0][data][value] No Farm
    filter[0][field] FMNAME

    How would I do a vvIn of this data? I haven't tried yet, but I thought I would just key in the names as they appear. They appear to be in array format, would vvIn_array work? If I get a chance to try this before anyone responds, I will post what I found.

  • #2
    I found that if you use the "encode: true" on the filter that you get JSON back and you can use vvIn_JSON to load in the individual parameters that ExtJS sends you. I am only doing character for now and get something like from ExtJS:

    filter [{"type":"string","value":"he","field":"FMNAME"},{" type":"string","value":"GX","field":"FKNEWSTRN"}]

    I pick out each item to build the SQL statement I need, with a loop through the number of fields I received back. It would be nice if there would be some Valence routine to perform this for us. I may add number, date, boolean and other types to my routine as time permits. Each has different parameters that get sent back, but since type is sent back you can determine which ones you want to process.

    Comment


    • #3
      Originally posted by ktoole View Post
      It would be nice if there would be some Valence routine to perform this for us.
      Can you be more specific?

      It sounds like something to generate the where clauses of an SQL statement, being passed field, type and value?

      Comment


      • #4
        Can we have something like 'applySorters' on vvOut for execSQLtoJSON? applyFilters would automatically add the information to the where clause to select out the values specified in the filters on the grid column.

        Comment

        Working...
        X