Select to view content in your preferred language

Turn off that second scrollbar in dgrid?

3268
7
Jump to solution
10-18-2015 09:53 PM
DavidChrest
Deactivated User

Is there a way to turn off that second scrollbar in the dgid? The one furthest to the right. It seems to have no use and creates an unwanted margin.

I found lots that can be done with the dgrid in css but nothing on this large scrollbar.

Capture.JPG

0 Kudos
1 Solution

Accepted Solutions
DavidChrest
Deactivated User

Robert,

Got it! Thanks, I'm a bit new at some of these things. Using Chrome's dev tools, found that this is how one turns off overflow scrollbar:

.dijitContentPane {
  overflow: hidden:
}

However, this turns off all the overflow scrollbars on all ContentPanes, some I do not want turned off (but this is still good to know in the future).

So I just added an inline css to the ContentPane holding my dgrid and works great.

<div data-dojo-id="bottomGridPane" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="splitter:'true', region:'bottom'" 
style="height: 240px; overflow: hidden;">


  <div id="divGridActivities"></div>


  </div>

Thanks so much for your help, much appreciated.

View solution in original post

0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus

David,

   you need to set the css overflow on the grids parent div to be hidden.

DavidChrest
Deactivated User

OK, this does not seem to work for me. Exactly what do I need to do in my code?

This is the div that holds my dgrid:

<div id="divGridActivities"></div>

This is the css for that div:

#divGridActivities {
  overflow: hidden;
}
0 Kudos
RobertScheitlin__GISP
MVP Emeritus

David,

   That looks correct to me. Is it the divGridActivities parent that is getting the scrollbar? Normally I determine this by using my browser developer tools to inspect the html elements and messing around with changing css at runtime.

DavidChrest
Deactivated User

Robert,

Got it! Thanks, I'm a bit new at some of these things. Using Chrome's dev tools, found that this is how one turns off overflow scrollbar:

.dijitContentPane {
  overflow: hidden:
}

However, this turns off all the overflow scrollbars on all ContentPanes, some I do not want turned off (but this is still good to know in the future).

So I just added an inline css to the ContentPane holding my dgrid and works great.

<div data-dojo-id="bottomGridPane" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="splitter:'true', region:'bottom'" 
style="height: 240px; overflow: hidden;">


  <div id="divGridActivities"></div>


  </div>

Thanks so much for your help, much appreciated.

0 Kudos
TONGSUN
Emerging Contributor

Robert,

I'm out of idea with my problem.  I had grid nicely displayed with outside contentpane not set to "overflow: hidden" originally.  My grid needs the scrollbars to get to all the data:

Then after I set outside contentpane's innerHTML to the layer name, scrollbar for the contentpane shows up. The grid is pushed down a little bit too:

If I set contentpane in HTML file style="overflow:hidden"(setting overflow="hidden" has not effect). That's what I got this:

I can't not to scroll to all the data now.  I also tried to add another contentpane above the grid to display layername etc, but the grid won't displayed as nice as the orignal way.

Thanks ahead!

Sandy

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Sandy,

   You should start a new thread with your specifics and the code you are using.

0 Kudos
TONGSUN
Emerging Contributor

Robert,

I thought my question was related to the original question and that's why I posted here.

After many tries, I accidently found the tricky way to make it look the way I want:

In HTML file, I added a space character to reserve a #text node in the outside contentpane:

<div id="tableDiv" data-dojo-type="dijit/layout/ContentPane" region="bottom" splitter="true" style="overflow: hide"> </div>

Then I programmably change the #text node value to layer name.  Then it as the way I want.

I didn't know this is the best answer so I didn't post it.

Thanks

0 Kudos