Results 1 to 2 of 2

Thread: Sorting parameter

  1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    5
    Answers
    2

    Default Answered: Sorting parameter

    hi, i want to sort a grid column according to a parameter. Is there a property which i can set it to the parameter i want to sort with. I can do this by overriding getSortParam method in column's view, but i want to set a property instead of overriding a method in view. Any suggestions?

    I have:
    getSortParam:function(){
    retrurn 'fileSize' //i want to sort with file size
    }

    I want:
    someproperty: 'fileSize'

    Alternatively,
    can i override getSortParam method in controller or model rather than view? I don't want to override it in view, because when i change the design using Ext designer my code in view will be overwritten and gone.

  2. I found the answer,
    You can override a method in controller just like this:

    Ext.getCmp(....).getSortParam=function(){

    return 'fileSize';
    }

  3. #2
    Sencha User
    Join Date
    Aug 2012
    Posts
    5
    Answers
    2

    Default

    I found the answer,
    You can override a method in controller just like this:

    Ext.getCmp(....).getSortParam=function(){

    return 'fileSize';
    }

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
  •