How to hide the left pane in JS grid gantt chart

I am creating a gantt chart using the How to: Create a Gantt Chart Using the JS Grid Control . I would like to hide the left pane that displays the grid and show only the gantt chart. Any idea how to do that?

Thank you.


  • Edited by Helm Ifort Monday, May 06, 2013 2:17 PM
May 6th, 2013 2:16pm

Hi,

You can remove the whole left pane using jquery .Here are the detailed steps:

    1. Open the gantt view in browser and press F12 ,you can use the arrow to select the left pane and get the div id .
    2. Then choose Site Actions>Edit Page .Add a content editor web part under the       gantt view .
    3. Click Click here to add content .Then choose HTML >Edit HTML Source .
    4. Add the code below to hide the left pane .

<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript">

</script>

<script type="text/javascript">

$(document).ready(function(){

setTimeout(function{hide()},100);

});

function hide(){

document.getElementById("ctl00_m_g_23383f59_80bb_4d7f_9bb2_7957e521ce66_ListViewWebPartJSGrid_leftpane").style.display='none';//you need to change the id to your leftpanes id

};

</script>

Thanks,

Enta

Free Windows Admin Tool Kit Click here and download it now
May 7th, 2013 3:17am

Hi Entan,

thanks a lot for your answer.

I have one more question for you. Do you know how can I reposition the bars in the gantt chart?

I would like to position the first 5 bars in the same line.

Thank you.

May 7th, 2013 2:23pm

It doesn't work for me. I added alert box to see if the code is running. I don't even see alert.

Please help.

I don't want to hide left pane but I want to show all the columns and remove scroll bar from left pane.

It should be fixed width.

Thanks.


  • Edited by SnehaM 12 hours 10 minutes ago
Free Windows Admin Tool Kit Click here and download it now
July 6th, 2015 3:30pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics