[CLOSED] Changing the Displaying message in a page on a grid

  1. #1

    [CLOSED] Changing the Displaying message in a page on a grid

    Hi,
    I need to get\change at run time the text: ' Displaying 1-20 of..' in the buttom of the page of a grid, from the client.
    I could not find any javascript method or property to allow me that.
    Your help is appritiated.
    Thanks
    Last edited by Daniil; Aug 16, 2012 at 6:19 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please set up the PagingToolbar DisplayMsg property.
    http://docs.sencha.com/ext-js/3-4/#!/api/Ext.PagingToolbar-cfg-displayMsg
  3. #3
    Hi Danill, Thanks for your answer.

    I was aware of this property but what I actualy need is the values in the braces, The displayMsg property is a string with braces that are filled in run time by extjs.

    I found theese properties in extjs 4x documentation

    pageData.fromRecord,
    pageData.toRecord,
    pageData.total

    they hold the info that I need, but are not avaiable version 3.3 which I use.

    So what I acualy need is to get the values inside the braces that are in the property displayMsg string : 'Displaying {0} - {1} of {2}'.

    Any Ideas?
    Thanks A Lot
  4. #4
    Please clarify the requirement. What exactly do you need to show instead of the default message?
  5. #5
    It would be enough if I could just read those numbers.
    This is for an autotest that I'm writing,I need to varify the record ranges as dispyed that string
  6. #6
    You can get them calling:
    PagingToolbar1.getPageData()
  7. #7
    I tried it before.. it will only gets me this:
    {
        total : 92,
        activePage : 1,
        pages : 5
    }
    As I mensioned ,from extjs ver 4 the API covers the start and end values of the current page messege. but in 3.3 the above is the only information I get.
    Any other ideas?
    Last edited by Daniil; Aug 16, 2012 at 5:29 PM. Reason: Please use [CODE] tags
  8. #8
    I got the requirement now.

    Please use the PagingToolbar cursor:
    http://docs.sencha.com/ext-js/3-4/#!...roperty-cursor

    Example
    var start = PagingToolbar1.cursor + 1,
        end  = PagingToolbar1.cursor + PagingToolbar1.store.getCount();
        
    alert(start + " " + end);
  9. #9
    this works great
    thanks!

Similar Threads

  1. [CLOSED] Examples Page not displaying
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: May 09, 2012, 3:17 PM
  2. Replies: 1
    Last Post: Mar 12, 2012, 2:17 AM
  3. Replies: 0
    Last Post: Jun 15, 2011, 5:40 AM
  4. GridView Header. Changing it look when reload page
    By grosenblatt in forum 1.x Help
    Replies: 2
    Last Post: Nov 29, 2010, 6:14 PM
  5. [CLOSED] RegexText not displaying error Message
    By Hari_CSC in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 02, 2010, 5:28 PM

Posting Permissions