GridWeb issue when fixing height to 100%

Hi,

My issue is quite simple. I have an application where the GridWeb Control fits almost the whole windows (height:100%, width:90%). On the right of the GridWeb, I have a button witch load the workbook data into the GridWeb.

When the GridWeb is empty, the template looks perfect. However, when I click on the button to load workbook data, if the worksheet number of line is large, the Gridweb height grows automatically and then the template is not fine.

I’ve attached to this post, a sample project to show you exactly the problem.

Hope you will help me to fix that issue,

Thanks,
Romain.

Hi Romain,


Thanks for the project.

After an initial test by running your project and following your steps, I can notice the issue (regarding GridWeb’s height) as you mentioned. I have logged a ticket with an id: CELLSNET-41075 for your issue. We will look into your issue to investigate it first. Once we have any update on it, we will let you know here.

Thank you.

Hi,

Thank you for your answer,

In addition to that, I have a question about user select. I have noticed a strange behaviour when i’m selecting a batch of cells. In fact, my cells are perfectly selected but all the data inside the cells located on the same line are highlighted.

I have attached to this post a capture which show the issue.

Thank you for your help.
Romain.

Hi,


Thanks for pointing it out with a screen shot.

I can notice the issue in IE browser type. I have logged it as well against your existing issue (“CELLSNET-41075”) in our Issue tracking system. We will also look into it as well.

Thank you.

Hi,

Thanks for using Aspose.Cells for GridWeb.

We have thoroughly investigated your issue and found out that this is not a bug. This issue was actually caused by your css file.

In the file AsposeTest\Styles\Site.css

here goes the content:

html, body, form#topform
{
background: #b6b7bc;
font-size: .80em;
font-family: “Helvetica Neue” , “Lucida Grande” , “Segoe UI” , Arial, Helvetica, Verdana, sans-serif;
margin: 0px;
padding: 0px;
color: #000000;
min-height: 99%;
height: 100%;
overflow:hidden; ->this line should be: overflow:true
}

after update this file,everything will be ok.

Our Suggestion:

If you want to set GridWeb’s height/width to 100% etc, make sure the style of the page should be set as overflow:true or overflow:auto.

When, you will add new rows/columns, the page will go bigger automatically and the whole content of the GridWeb could be shown.

Hi,

I have followed your advice however I still have the same issue.

I set the overflow to auto and then to visible but my gridweb control still grow each time I push on the button to populate it.

What I want is :

A GridWeb control which keep the same height (100% of the page) even if I add a lot of line. I want a vertical control scrollbar integrated (like for horizontal scrollbar) and not a vertical scrollbar for the whole page.

I’ve attached you a capture to show you that the issue is still here.

Thank you for your help,
Romain

Hi,

Thanks for your posting and using Aspose.Cells for GridWeb.

If you want to set 100% height to match the page height and not automatically increase gridweb height then here is the solution:.

Firstly set a specific height e.g 600px for gridweb component.

Then you can get client page height and reset this height for gridweb in js function.

Here is some code example:

in default.aspx we have

<acw:GridWeb ID=“GridWeb1” runat=“server” Width=“100%” Height=“600px” ShowLoading=“true”
…>
</acw:GridWeb>

in client js file you can call function:

function getBrowserPageHeight() {
var D = document;
return Math.max(
Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
Math.max(D.body.clientHeight, D.documentElement.clientHeight)
);
}
doucument.getElementByID(“MainContent_GridWeb1”).style.height=getBrowserPageHeight();

Hi,

I’ve attached you a video capture to show you what happened when I’m using the following code

mshakeel.faiz:


in default.aspx we have

<acw:GridWeb ID=“GridWeb1” runat=“server” Width=“100%” Height=“600px” ShowLoading=“true”
…>
</acw:GridWeb>

in client js file you can call function:

function getBrowserPageHeight() {
var D = document;
return Math.max(
Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
Math.max(D.body.clientHeight, D.documentElement.clientHeight)
);
}
document.getElementById(“MainContent_GridWeb1”).style.height=getBrowserPageHeight();



Looking forward your help,
Thanks,
Romain

Hi,


Thanks for your feedback by providing a sample video captured for the issue.

I have logged it to attach with your existing issue “CELLSNET-41075”. We will look into it soon.

Thank you.

Hi,

Thanks for using Aspose.Cells for GridWeb.

We think, you can write the following code in the client js:

You can call it after init of the gridweb or just put it at the end of the acwmain method .

JS code goes like:

var mypageheight= Math.max(
Math.max(document.body.scrollHeight, document.documentElement.scrollHeight),
Math.max(document.body.offsetHeight, document.documentElement.offsetHeight),
Math.max(document.body.clientHeight, document.documentElement.clientHeight)
);
mypageheight=mypageheight-3; //adjust a litter small,otherwise,the page scrollbar will appear
//alert(“hellow”+mypageheight);
document.getElementById(“MainContent_GridWeb1_vsBar”).style.height=(mypageheight-26)+“px”;
document.getElementById(“MainContent_GridWeb1_vsBar”).scrollTop=0;//always scroll to top
document.getElementById(“MainContent_GridWeb1_leftPanel”).style.height=(mypageheight-47)+“px”;
document.getElementById(“MainContent_GridWeb1_viewPanel”).style.height=(mypageheight-47)+“px”;

Hi,

Thank you for your help, it works now…

Do you have some news about the following issue ?

lswe:
Hi,

Thank you for your answer,

In addition to that, I have a question about user select. I have noticed a strange behaviour when i’m selecting a batch of cells. In fact, my cells are perfectly selected but all the data inside the cells located on the same line are highlighted.

I have attached to this post a capture which show the issue.

Thank you for your help.
Romain.


Thank you.
Romain

Hi,

It’s good to know that your previous issue is now resolved.

We have logged your highlighting cell content’s issue as per your image in our database. We will look into your issue and help or advise you soon.

This issue has been logged as CELLSNET-41149.

Hi,


Please download and try the latest fix: Aspose.Cells for GridWeb v2.7.11.2001

Thank you.

Hi,

We 've updated the .js file to support your needs. You can implement your requirement by yourself based on this copy of the .js file.

In the .js file, you can set isUseClientPageHeight to true to enable this feature.

Thus, the GridWeb will set the height to suit your page height.


Thank you.

Amjad Sahi:

Hi,

We 've updated the .js file to support your needs. You can implement your requirement by yourself based on this copy of the .js file.

In the .js file, you can set isUseClientPageHeight to true to enable this feature.

Thus, the GridWeb will set the height to suit your page height.

Thank you.

Hi,

The above fix with the updated acwmain.js file shared by Amjad i.e Attachment: Aspose.Cells.GridWeb2.7.11.2001.zip is for the issue id: CELLSNET-41075 only

We are still working on your other issue relating to highlighting i.e CELLSNET-41149 and will update you once it is fixed.

Hi,

Thank you for the update you have made in the .js file. It works perfectly.

I hope I’ll have some good news about my other issue.

Thanks,
Romain

Hi,

Thanks for your feedback and posting.

You are welcome. Sure, we are working over your issues and once we will have some update for you, we will notify you.

Hopefully, your issues will be fixed soon.

The issues you have found earlier (filed as CELLSNET-41149) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan