Results 1 to 2 of 2

Thread: ux.grid.GridFilters local - filter on rendered column

  1. #1
    Ext User
    Join Date
    Dec 2009
    Vote Rating

    Default ux.grid.GridFilters local - filter on rendered column

    Hi all,

    I try to use ux.grid.GridFilters type String for column with renderer ux.renderer.Combo for show and edit foreign table data, but validateRecord function is build only for value (in my implementation ID) and not for displayed value. In this function its available only record object, but there is no information about renderer value.

    Have somebody idea how can I compare this rendered value?

    Thanks for any response.


  2. #2
    Ext JS Premium Member
    Join Date
    Apr 2010
    Midwest, USA
    Vote Rating


    If you always want the rendered value to be what's compared, here's the solution.

    Use Ext.override on the Ext.ux.grid.filter.StringFilter object, specifically on validateRecord function, copy that function into the override and then change the line:
    var val = record.get(this.dataIndex);

    var val = yourRenderFunction(record.get(this.dataIndex));

    where yourRenderFunction is whatever function you are using to render the data.

    If you don't always want this to be the case, add an extra option to the config and then check for it in this function using the same override method above, and do the checks for filtering based on this conditionional logic instead.

    Make sure to include your function within the override call.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts