[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to disable scrollbars (vertical and horizontal)?

Posted on 2008-11-11
2
Medium Priority
?
6,023 Views
Last Modified: 2012-05-05
I am new to Dojo 1.2.
 I am able to use the DataGrid for displaying contents of an array.
How can I turn off the scrollbars (horizontal and vertical)?
In other words, the scrollbars should display when there are 20 or more rows being displayed?


A snippet of my markup is as follows:
 
<div dojoType="dijit.layout.ContentPane" region="center">
     <div dojoType="dojox.grid.DataGrid" id="_grid"
          elasticView="1" query="{id: '*'}"
          rowsPerPage="20" store="mydatastore"
          structure="mygridlayout" rowSelector="0px">
    </div>
</div>

Open in new window

0
Comment
Question by:cwatkins
2 Comments
 
LVL 15

Accepted Solution

by:
justinbillig earned 375 total points
ID: 22939928
I don't think you can turn off the scrollbars for the page but you an encapsulate the div inside another div for scrolling. You'll need to adjust the size of your outer div to fit your needs.
<div style="overflow:scroll" >
<div dojoType="dijit.layout.ContentPane" region="center">
     <div dojoType="dojox.grid.DataGrid" id="_grid"
          elasticView="1" query="{id: '*'}"
          rowsPerPage="20" store="mydatastore"
          structure="mygridlayout" rowSelector="0px">
    </div>
</div>
 
 
</div>

Open in new window

0
 

Author Comment

by:cwatkins
ID: 22946625
Create the Grid within an addOnLoad function, the rows rendered to the expected size. Calling the sizeChange() method forced the Grid to recalculate the size.

var grid = new dojox.Grid({autoHeight:true,id: "gridCardDef",model: model, structure: layout},dojo.byId("grid"));      
grid.sizeChange();
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses
Course of the Month20 days, 13 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question