We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ModifiedCells is always empty when EnableAjax is set to true

Hi,

I have an issue with the GridWeb control. In fact when I set EnableAjax to true the server side property ModifiedCells is always empty. However, when I set this property to false, it works perfectly.

I attach to this post a sample project which describes the issue. All you have to do is :

  1. Execute the project.
  2. Modify a cell
  3. Click on the top right button labeled "Click here"

You will see the state of the ModifiedCells property at different events of page cycle.

I hope you will bring me a solution,
Thank you,
Romain.

Hi,


Thanks for the sample project with a template file.

After an initial test, I can notice the issue as you mentioned by running your sample project with your template file. If we set the EnableAjax to true, ModifiedCells is always empty (even after some modifications) but if we set it to false, it works as expected. We will investigate and look into it if this is expected behavior or a bug with the product.

I have logged a ticket with an id “CELLSNET-41730” for your issue. We will look into it soon.
Once we have any update on it, we will let you know here.

Thank you.

Hi,

Thanks for your quick reply,

I wait for an update from you,

Regards,
Romain,

Hi,

When using Ajax way, after you edit one cell, the updation will be submitted to the server automatically. When you click the button the update progress was already done. So, if you want to get modified cells, you need to do something in ajaxcallback function of the "acwmain.js" file:

e.g

function ajaxcallback()
{//console.log("ajaxcallback,,,,,,,,,,,,,");
if (this.ajaxXmlHttp != null && this.ajaxXmlHttp.readyState == 4)
{
if (this.ajaxsendtimeout != null)
{
clearTimeout(this.ajaxsendtimeout);
this.ajaxsendtimeout = null;
}
var adoc = this.ajaxXmlHttp.responseXML;
var nodes = adoc.selectNodes("CELLS/CELL");
for (var i = 0; i < nodes.length; i++)
{
var node = nodes[i];
var cell = this.getCell(node.getAttribute("R"), node.getAttribute("C")); -->TODO here is what

you can do it by yourself, our client end's .js file is open source, you can modify it by yourself for your needs.

Thank you.


Hi,

Sorry for my late answer,

Do you mean that the GridWeb ModifiedCells property does not work when Ajax is set to true and that it is an expected behaviour?

This seems odd to me. I do not expect to have properties that do not work when EnableAjax is set to true.

Thanks,
Romain

Hi,


We will get back to you soon with more details.

Thanks,

Hi,


"Do you mean that the GridWeb ModifiedCells property does not work when Ajax is set to true and that it is an expected behaviour? "

Yes, your understanding is correct. The server side attribute i.e…, ModifiedCells does not take effect when Ajax is enabled.

Thank you.

Hi,

Thank you for your quick reply,

"Yes, your understanding is correct. The server side attribute i.e…, ModifiedCells does not take effect when Ajax is enabled."

Did you plan to do that in a future version of the GridWeb ?

Thanks,
Romain
Hi,

After some investigation, we come to know that it is hard to do it on the server side, we might not implement it, please use the client side way.

Thanks for your understanding!

Hi,


Two years later, I still have the same issue. ModifiedCells on server side is always empty when EnableAjax is set to true.

If there is no easier way to do that, could you please explain me how to do that on client side ?

Thank you,

Romain.

Hi,


We will check if we can provide you a sample to get updated/ modified cells (e.g on client side) for your reference.

We will get back to you soon.

Thank you.

Thank you very much,


In fact, I need to get ModifiedCells and of course send them server side on each postback as ModifiedCells property was supposed to do.

Hi,


Well, the client side script workaround should work as we suggested earlier in one of my previous replies (https://forum.aspose.com/t/93169).

For ModifiedCells on server side has values in every Ajax request time period, so you cannot get its value after Ajax request:
///
/// Fires when the Ajax update of the control finished.(the EnableAJAX shall be set to true)
///


Anyways, we will add the following event for your need:
public event WorkbookEventHandler AjaxcallFinished
so, you could call gridweb.ModifiedCells in this event handler.
I have logged an official ticket with an id “CELLSNET-44033” for your requested feature. We will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.



Thank you very much,


That sounds perfect. Or if it is easier for you then you can just add an OnCellModifiedOnAjax server event which works the same way that OnCellClickOnAjax.

Thanks again.

Romain.

Hi,


Thanks for your suggestion.

I have logged your suggestion against your issue “CELLSNET-44033” into our database. Our concerned developer from product team will evaluate it and if he finds it feasible, he will implement it. Otherwise, he will go for our suggested way.

Thank you.

Hi,


Could you please tell me approximatly when you will provide me this update?

Thanks,

Hi,


I have asked the concerned developer to provide an eta for the fix. Once we received the response from the developer, we let you know here immediately.

Thank you.

Hi Jerome,


This is to update you that we will be able to provide the fix for CELLSNET-44033 on Friday, 6th November 2015. As soon as the fix is ready for your testing, we will notify you here in reference to aforementioned ticket.

Hi,


Please try our latest version/fix: Aspose.Cells.GridWeb v8.6.1.3 (attached)

We have added your requested feature for the ticket logged as “CELLSNET-44033”.<o:p></o:p>

Let us know your feedback.

Thank you.

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.