Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9237589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:34:05+00:00 2026-06-18T07:34:05+00:00

Suppose I have multiple sources for which I want to have a dojo-grid and

  • 0

Suppose I have multiple sources for which I want to have a dojo-grid and populate by their data.
When one source is selected, I am able to create and populate the grid. But when it comes to the selecting all sources at a time suppose I have selected 3. So , I have to create 3 grids in same page instead of one. I guess I have to use loops so that I can create the grids as many as source.

But I am not able to write the code for creating multiple dojo jata grid. Please give some suggestions or suggest with some code examples.

For single grid I have code like this:

     require(['dojox/grid/DataGrid', 'dojo/data/ItemFileReadStore', 'dojo/date/stamp',      'dojo/date/locale', 'dojo/domReady!'],
          function(DataGrid, ItemFileReadStore){
            var layout = [
                {name:'srcrecno',field:'srcrecno',width:20},
                {name: 'Score', field: 'Score', width:20},
                {name: 'Members', field: 'Members', width:20},
                {name:'Entities', field:'Entities',width:20}
                ];

            var store = new ItemFileReadStore({
                data: {
                    items:<%=fa.jsonstring()%>
                }
            });
            var grid = DataGrid({
                id: 'grid',
                store: store,
                structure: layout,

            });
            grid.placeAt('gridDiv');
            grid.startup();
        }); 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:34:06+00:00Added an answer on June 18, 2026 at 7:34 am
    var data1 =  {
            items : <brp:json value="${display1}"/>,
            identifier : "id"
        };
     var store = new dojo.data.ItemFileReadStore({
        data : data1
    }); 
    
            var layout = [ {
                field : 'id',
                name : 'Column1',
                width : '150px'
            },{
                field : 'Column2',
                name : 'Column2',
                width : '200px'
                },{
                field : 'Column3',
                name : 'Column3',
                width : '490px'
            } ];
            var grid = new dojox.grid.EnhancedGrid({
                id : 'grid',
                 query : {
                    id : '*'
                }, 
                store : store, 
                clientSort : false,
                rowSelector : '20px',
                plugins: {indirectSelection: {headerSelector:true, width:"40px", styles:"text-align: center;"}},
                height : "380px",   
                structure : layout,
            }, document.createElement('div'));
    
            dojo.byId("div1").appendChild(grid.domNode);
    
    
    
             var data2 =  {
                    items : <brp:json value="${display1}"/>,
                    identifier : "id"
                };
             var store2 = new dojo.data.ItemFileReadStore({
                data : data2
            });  
    
            var Structure2 = [ {
                field : 'id',
                name : 'Column1',
                width : '150px'
            },{
                field : 'Column2',
                name : 'Column2',
                width : '200px'
                },{
                field : 'Column3',
                name : 'Column3',
                width : '490px'
            } ];
            var grid2 = new dojox.grid.EnhancedGrid({
                 id : 'grid2',
                 query : {
                 id : '*' 
                }, 
                store : store2,
                clientSort : false,
                rowSelector : '20px',
                plugins: {indirectSelection: {headerSelector:true, width:"40px", styles:"text-align: center;"}},
                height : "380px",   
                structure : Structure2,
    
            }, document.createElement('div'));
    
            dojo.byId("div2").appendChild(grid2.domNode); 
    
            grid.startup();
            grid2.startup();
    

    You have to do one more thing –
    Inside div where you want to display the div put with height

    Notes –
    grid.startup(); –> indicate starting of your div
    where grid is your specified grid

    div1 and div2 —> your div-id

    plugins:
    {indirectSelection: {headerSelector:true, width:"40px", styles:"text-align: center;"}}
    –>is for check boxes for your grid data’s

    Like this we can populate no. of grid using dojo.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have multiple Facebook like boxes in one page. Suppose, I have two dives
Suppose I have multiple roles, each one defining a set of items: package A;
Suppose I have multiple classes. I have to find out which class code is
Suppose we have a DAG with one source. I would like to find nodes
so 1GvG:s/..../g can replace over an entire buffer However, suppose I have multiple vim
suppose i have a .on() function wherein i select multiple ids $(#i, #am, #your,
Suppose multiple Modal Windows shown above each other. All of those have ShowInTaskbar =
I have a remote server which handles various different commands, one of which is
I have multiple web services that write data inside a database table. I'd like
Suppose we have multiple sites (using sites-framework of Django) running on the same django

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.