Results 1 to 4 of 4
  1. #1
    surya_dks is offline Member
    Join Date
    Jul 2008
    Posts
    5
    Rep Power
    0

    Default How to display two grids using EXTJS

    Hi,

    How to display two grids in the same jsp using extjs library. I have written some code for displaying the first grid, but on click of a row in the first grid, I need to display the second grid like the attached screen shot. I am not getting any idea for how to get the second one. Can some body help me please its very urgent(if possible please give me the code for that.).

    here is the code for first grid

    function onFunctionLoad(){
    Ext.onReady(function(){
    var x=eval(request.responseText);
    var myData = x;
    var store = new Ext.data.SimpleStore({
    fields: [
    {name: 'userid'},
    {name: 'WorkType'},{name: 'Building'},
    {name: 'Floor'},{name: 'Space'},{name: 'WorkType Status'}
    ]
    });
    store.loadData(myData);
    var grid = new Ext.grid.GridPanel({
    store: store,
    columns: [
    {id:'userid',header: "userid", width: 160, sortable: true, dataIndex: 'userid'},
    {header: "WorkType", width: 75, sortable: true, dataIndex: 'WorkType'},
    {header: "Building", width: 75, sortable: true, dataIndex: 'Building'},
    {header: "Floor", width: 75, sortable: true, dataIndex: 'Floor'},
    {header: "Space", width: 75, sortable: true, dataIndex: 'Space'},
    {header: "WorkType Status", width: 75, sortable: true, dataIndex: 'WorkType Status'}
    ],
    stripeRows: false,
    autoExpandColumn: 'userid',
    sm: new Ext.grid.RowSelectionModel({
    singleSelect: true,
    listeners: {
    rowselect: function(sm, row, rec) {
    selectedVal=row;
    }
    }
    }),
    height:250,
    width:500,
    title:'Direct Reports'
    });

    grid.render('grid-example');
    grid.getSelectionModel().selectFirstRow();
    });
    Attached Thumbnails Attached Thumbnails How to display two grids using EXTJS-grid.jpg  

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default

    This looks like javascript. You might get better help on a javascript forum.

  3. #3
    Supamagier is offline Senior Member
    Join Date
    Aug 2008
    Posts
    384
    Rep Power
    6

    Default

    It IS JavaScript. Sorry, can't help ya.
    I die a little on the inside...
    Every time I get shot.

  4. #4
    venkateshaare is offline Member
    Join Date
    Nov 2008
    Posts
    3
    Rep Power
    0

    Smile regarding posting

    Just now I entered in to java development team.


    Right now I am just checking posted questions.It was very good.Sure I will start posting.


    Thanks,
    Venkatesh Aare

Similar Threads

  1. Regarding the display of histogram
    By Mazharul in forum Java 2D
    Replies: 2
    Last Post: 08-27-2008, 03:09 AM
  2. Replies: 0
    Last Post: 06-28-2008, 09:26 PM
  3. How to display image ?
    By Birkoff in forum AWT / Swing
    Replies: 7
    Last Post: 06-09-2008, 07:58 AM
  4. SWT Display class
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-30-2007, 12:19 PM
  5. Display program
    By nhlfan in forum New To Java
    Replies: 2
    Last Post: 11-22-2007, 12:00 AM

Posting Permissions

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