Hello,
I am using Aspose.Cells for .NET to create a Web Application.
I am facing a problem to refresh a sheet by handling event. I am using Ajax (EnableAjax = true) and Internet Explorer 7 and 8.
I have some buttons outside of the control to apply some event on the control.
For example I have a button to filter data inside the control. By clicking on this button which is outside the control I get a list of data contained in the gridWeb (4 lines for example). I select one of these line and apply the filter. The sheet isn’t refreshing…
By applying the filter I call again all my methods used to initialize the sheet (one for the style and another for the data). But nothing happened.
I have to switch to another sheet and go back to the sheet on which I have applied the filter to see the modifications.
I don’t understand why Ajax is not working on this case because it works fine for other event.
For example when I navigate between differents sheets, each sheet is displaying well and I call the same methods to display it (Initialize the style, setting the data).
Is there a known issue with Ajax when the event comes from a button which is not in the GridWeb ?
Thanks for your answers.
Hi,
Thanks for your quick answer.
My collegue is working on a sample project to share with you our issues.
We will provide it to you as soon as we can.
Hello,
Please find in attachement to this post a sample project that shows the refresh issue.
If you look at the code, when you click on the second tab sheet, the custom command button is supposed to be hidden. But as the refresh is not working it is still displayed. The problem appears in every browser (Internet Explorer and Firefox).
Thanks for your consideration.
Hi,
Thanks for your quick answer.
I hope you will find a solution for this problem !
Hi,
Hi.
Well you are right it fixes the issue with the custom command button.
But in fact it’s not the refresh issue.
I have created two new samples project to allow you understand the issue.
WebApplication1
In this example the DataSource contains only 5 rows. You can test two features :
- the button fill 3 which is supposed to change the DataSource and refresh the control with the new data => doesn’t work no refresh. But if I use an aspose feature after using the Fill3 button (i.e Add Row) it adds a row and it refreshes the sheet with the right DataSource.
- the custom command button “Add” which insert a new row in the DataSource and refresh the control. The row is not added in the control whereas in the DataTable. It erases the current row and doesn’t expand the row number on the sheet.
WebApplication2
In this example the DataSource contains 50 rows. You have the same two features :
- the button fill 3 which doesn’t work too.
- the custom command button “Add” which in this case works !
And I think it’s because of the number of rows. We have 50 rows so the control create a vertical scrollbar. When you add a row, the control is refreshing because of the scrollbar (a refresh on aspose side ? In JavaScript ?). So we have the new row and if we scroll down you can see the loading bar and when the sheet is loaded we have now 51 rows instead of 50.
Hello,
Is there some news for this issue ?
It is a big one I know but also very important for my project.
Thanks
Hi,
Ok I will explain the steps I have followed.
In the sample project WebApplication1 :
- Click on sheet2 : the sheet fills with the DataTable => you have 5 rows
- Click on the button “Fill2” : a div appears with a new button “Apply new fill”
- Click on the button “Apply new fill” : it is supposed to reload the sheet with a new DataTable but it doesn’t work => refresh issue
- Click on the custom command button “Add” : it is supposed to add a row at the row index of the active cell but it doesn’t work => it erases the current row with the new and you still have 5 rows (instead of 6).
In the sample project WebApplication2 :
- Click on sheet2 : the sheet fills with the DataTable => you have 50 rows
- Click on the button “Fill2” : same behavior than WebApplication1 the reload of the sheet doesn’t work.
- Click on the custom command button “Add” : it works fine ! The new row is properly added you can see that you have now 51 rows.
The only difference between the two project is that you have 50 rows in WebApplication2 and then a vertical scrollbar.
If you need more information let me know !
Thanks
Hi,
Hi.
For the refresh issue it works fine with the parameters PostBackUrl ! Thanks a lot !
For the add row custom command button, I don’t understand how you did to get a sheetTabIndex undefined.
I have just made some tests on each sheet and sheetTabIndex contains the right value but the method still erases the current row.
Please try again with the sample project attached to this post.
Thanks
Hi,
As you can see on my screenshots attached it works fine for me.
I am pretty sure you are testing it with Firefox and the JavaScript code is optimized for Internet Explorer
Try on IE and you’ll see that you will not have the exception again.
Hi,
Hi,
I don’t understand it’s working now but we have not changed anything ?!
Why it is working now and not before with the same code ?
Thanks.
Hi,