Results 1 to 2 of 2

Thread: Sorting by IP adress on GridPanel

  1. #1

    Talking Sorting by IP adress on GridPanel

    This is my GridPanel
    Code:
    var grid = new Ext.grid.GridPanel({
            renderTo: Ext.getBody(),
            frame:true,
            title: 'SH',
            height:530,
            width:500,
            loadMask: true,
            store: store,
            columns: [
                {header: "IP", dataIndex: 'ip', sortable: true},
                {header: "ModelName", dataIndex: 'modelName', sortable: true},
                {header: "StateText", dataIndex: 'stateText', sortable: true},
                {header: "GroupName", dataIndex: 'groupName', sortable: true}
            ],
            bbar: new Ext.PagingToolbar({
                pageSize: myPageSize,
                store: store
            })
    });
    I wanted to sort my grid by IP address but it worked like this
    192.168.1.10
    192.168.1.2
    192.168.1.20
    192.168.1.3

    The order I wanted is
    192.168.1.2
    192.168.1.3
    192.168.1.10
    192.168.1.20

    Actually I read the post of this problem in the forum, but I didn't understand it.
    I'm looking forward to an explanation in more detail & easier manner with example code.

    Thank you

  2. #2

Posting Permissions

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