1. #1
    Sencha User
    Join Date
    Apr 2009
    Posts
    57
    Vote Rating
    1
    vikaskapoor is on a distinguished road

      0  

    Default Unanswered: align Grid Headers verically

    Unanswered: align Grid Headers verically


    Hi,

    Is there any possible way to align the Grid Headers vertically/

    My requirement is to have a grid with all its headers align on the left and the corresponding data columns also such that each new row is aligned vertical.


    Thanks,

  2. #2
    Sencha Premium Member findajit's Avatar
    Join Date
    Mar 2009
    Location
    Hyderabad, India
    Posts
    62
    Answers
    6
    Vote Rating
    0
    findajit is on a distinguished road

      0  

    Default


    @vikas

    The grid panel does not offer this functionality, out-of-the-box. In case you need this, you will have to extend the grid panel
    My Book on Sencha Touch - Sencha Touch Cookbook (2nd Edition)
    My older book on Sencha Touch - Sencha Touch Cookbook
    My Sencha Touch Blog - Walking Tree Sencha Touch Blog
    My ExtJS Blog - Walking Tree ExtJS Blog

    Buy ExtJS Components from - Walking Tree e-Store

  3. #3
    Sencha User
    Join Date
    Apr 2009
    Posts
    57
    Vote Rating
    1
    vikaskapoor is on a distinguished road

      0  

    Default


    Ajit,

    I have the requirement to implement the grid panel in such a way
    Can you please guide me how to approach?


    Thanks,

  4. #4
    Sencha Premium Member findajit's Avatar
    Join Date
    Mar 2009
    Location
    Hyderabad, India
    Posts
    62
    Answers
    6
    Vote Rating
    0
    findajit is on a distinguished road

      0  

    Default


    What are the features you require on your grid with vertical headers? sorting? filter? summary? row body? grouping?
    My Book on Sencha Touch - Sencha Touch Cookbook (2nd Edition)
    My older book on Sencha Touch - Sencha Touch Cookbook
    My Sencha Touch Blog - Walking Tree Sencha Touch Blog
    My ExtJS Blog - Walking Tree ExtJS Blog

    Buy ExtJS Components from - Walking Tree e-Store

  5. #5
    Sencha User
    Join Date
    Apr 2009
    Posts
    57
    Vote Rating
    1
    vikaskapoor is on a distinguished road

      0  

    Default


    i need just the local sort and nothing else

  6. #6
    Sencha Premium Member findajit's Avatar
    Join Date
    Mar 2009
    Location
    Hyderabad, India
    Posts
    62
    Answers
    6
    Vote Rating
    0
    findajit is on a distinguished road

      0  

    Default


    @vikas,

    start looking at the Ext.view.TableChunker code and look at the XTemplates - metaTableTpl and metaRowTpl - used to render the tables for the grid. You will have to start by modifying the XTemplate, which will help you to render the header vertically.
    My Book on Sencha Touch - Sencha Touch Cookbook (2nd Edition)
    My older book on Sencha Touch - Sencha Touch Cookbook
    My Sencha Touch Blog - Walking Tree Sencha Touch Blog
    My ExtJS Blog - Walking Tree ExtJS Blog

    Buy ExtJS Components from - Walking Tree e-Store

  7. #7
    Sencha User
    Join Date
    Apr 2009
    Posts
    57
    Vote Rating
    1
    vikaskapoor is on a distinguished road

      0  

    Default


    @ajit,

    I am working on a grid which automatically refreshes after a particular interval of time and loads the updated data from server.

    So, is there any way such that I can design the grid and store in such a way that every time the grid refreshes rather than a row a new column is being appended.

    To achieve this I am using grid.reconfigure() to create a new grid every time.

    Is this way of approaching the problem is good enough?
    Also if anything I can improve over in this approach please let me know.


    thanks,

  8. #8
    Sencha Premium Member findajit's Avatar
    Join Date
    Mar 2009
    Location
    Hyderabad, India
    Posts
    62
    Answers
    6
    Vote Rating
    0
    findajit is on a distinguished road

      0  

    Default


    @vikas,

    if you don't wanna take the approach of defining a new component as suggested above, reconfigure approach sounds reasonable.
    My Book on Sencha Touch - Sencha Touch Cookbook (2nd Edition)
    My older book on Sencha Touch - Sencha Touch Cookbook
    My Sencha Touch Blog - Walking Tree Sencha Touch Blog
    My ExtJS Blog - Walking Tree ExtJS Blog

    Buy ExtJS Components from - Walking Tree e-Store

  9. #9
    Sencha User
    Join Date
    Apr 2009
    Posts
    57
    Vote Rating
    1
    vikaskapoor is on a distinguished road

      0  

    Default


    @ajit,

    i have implemented the grid using reconfigue approach, but now I wanted to implement paging in the grid and for that I am using paging toolbar.
    but i need to reconfigure the grid on the next button and previous button click of paging toolbar, is it possible to reconfigure the grid while paging?


    thanks,

  10. #10
    Sencha Premium Member findajit's Avatar
    Join Date
    Mar 2009
    Location
    Hyderabad, India
    Posts
    62
    Answers
    6
    Vote Rating
    0
    findajit is on a distinguished road

      0  

    Default


    Yes. You can override Ext.toolbar.Paging and implement the following methods:
    • moveFirst
    • moveNext
    • movePrevious
    • moveLast
    • doRefresh
    With this you shall be able to take care of specific behaviours
    My Book on Sencha Touch - Sencha Touch Cookbook (2nd Edition)
    My older book on Sencha Touch - Sencha Touch Cookbook
    My Sencha Touch Blog - Walking Tree Sencha Touch Blog
    My ExtJS Blog - Walking Tree ExtJS Blog

    Buy ExtJS Components from - Walking Tree e-Store

Thread Participants: 1