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

Free Support Forum - aspose.com

Trigger an UpdatePanel from GridWeb where EnableAjax is set to true

Hi,

I have a simple project which contains a GridWeb and an update panel. What I want to do is updating an UpdatePanel on tab click as a trigger. I manage to do it only if EnableAjax is set to false. However when EnableAjax is set to true, it does not work.

I have attached to this post a sample project which shows the issue. Maybe you will give me another way to do this.

Thank you,
Romain.

Hi,

Thanks for the sample project.

I have logged a ticket with an id "CELLSNET-41631" for your issue. We will investigate your issue soon.

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

By the way, did you try our latest version Aspose.Cells.GridWeb v2.7.18.2000, you may get that version installing our latest version of Aspose.Cells for .NET v7.4.3:
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry460770.aspx

if it makes any difference.


Thank you.

Hi,


We have analyzed your issue a bit. We have run your project and we found there seems no issue in the project, could you please provide us some screen shots to describe your problem and what is your requirement. We could not understand your requirement. By the way, if you want to switch worksheets on updatepanel, the solution can be found in the thread, please go through and refer to it:
<a href="https://forum.aspose.com/t/102983

Thank you.

Hi,

Thanks for your answer, I will try to provide you more information,

As I said, the application only contains a GridWeb and an UpdatePanel (Not a GridWeb inside an UpdatePanel).


<acw:GridWeb ID=“GridWeb1” runat=“server” Width=“100%” Height=“600px” ShowLoading=“true” PresetStyle=“Standard” EnableAJAX=“true” OnSheetTabClick=“LoadPanel”>
</acw:GridWeb>


<asp:Button ID=“Button1” runat=“server” Text=“Export” OnClick=“Button1_Click” />
<asp:UpdatePanel ID=“UpdatePanelDimensions” UpdateMode=“Conditional” runat=“server”>

<asp:PlaceHolder ID=“DimensionsHolder” runat=“server”></asp:PlaceHolder>

</asp:UpdatePanel>


Inside the UpdatePanel, there is a PlaceHolder. If you read the server side code of my sample project you’ll see that OnTabClick I try to add a label inside my placeholder and then to refresh the updatePanel :

Label label = new Label();
label.Text = GridWeb1.WebWorksheets.ActiveSheet.Name;
DimensionsHolder.Controls.Add(label);
UpdatePanelDimensions.Update();

However as you can see when you execute the project the placeHolder stays empty onTabClick.

Thank you,
Romain.


Hi,


We appreciate if you could provide us some screen shots to describe your problem when running your attached project on VS.NET (you may add some break points to show the variable/object data at specified intervals) to better understand your issue. We will check your issue soon.

Thank you.

Hi,

I tried to clean the sample project to remove all the useless code.

You just have to consider that I have on one hand a GridWeb and on the other hand an UpdatePanel which contains a PlaceHolder. GridWeb EnableAjax field is set to true.

What I want to do is to refresh the UpdatePanel on GridWeb tab click. The refresh is to add a label inside the PlaceHolder and this label has to display the active sheet name. I set the PlaceHolder background color to red to make it more visible. Moreover I added a trace inside the tab click event to let you understand what should happened.

Please let me know if you need more information,
Regards,
Romain,

Hi,


Thanks for the updated project.

I have logged it to attach with your existing issue id “CELLSNET-41631” into our database. We will look into and investigate the issue.

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

Thank you.

Hi,

Thanks for your answer,

I hope I will have any update from you soon,

Regards,

Hi,

Did you find any workaround for my needs ?

Thanks,
Romain

Hi,


Thanks for following up.

Our concerned developer has investigated and evaluated your issue. We think the debug output information is correct as what we expect, so it is not a bug of GridWeb.

Thank you.

Hi,

Thanks for your answer,

However even if it is not a bug of the GridWeb I think that every control shall be able to trigger an UpdatePanel. I mean that for example, an asp button click can be declared as an updatePanel trigger :

<asp:UpdatePanel ID=“UpdatePanelDimensions” UpdateMode=“Conditional” runat=“server”>

<asp:PlaceHolder ID=“DimensionsHolder” runat=“server”></asp:PlaceHolder>


<asp:AsyncPostBackTrigger ControlID=“Button1” EventName=“Click” />

</asp:UpdatePanel>

This code works perfectly. It says to refresh (using AJAX) the UpdatePanel when a Button1 click event is fired. I cannot understand why the following code with GridWeb event does not work.

<asp:UpdatePanel ID=“UpdatePanelDimensions” UpdateMode=“Conditional” runat=“server”>

<asp:PlaceHolder ID=“DimensionsHolder” runat=“server”></asp:PlaceHolder>


<asp:AsyncPostBackTrigger ControlID=“GridWeb1” EventName=“SheetTabClick” />

</asp:UpdatePanel>

Maybe you are able to provide me an explanation about this weird behaviour. I am using many other controls (from other providers) which allow me to do that…

Thanks,
Romain

Hi,

It is a very big problem for me because I need to refresh different parts of my ASP page onSheetTabClick. Before it was not a problem because the onSheetTabClick event caused a full refresh of the page. Since I use OnCellSelectedAjaxCallBackClientFunction and set EnableAJAX to true, I have not found a way to do that.

Thanks,

Hi,


Thanks for sharing your concerns.

I have logged your provided details against your issue “CELLSNET-41631” into our database. Our concerned developer will look into it and investigate it further. Once we have any update on it, we will let you know here.

Thank you.

Hi,

Thanks for your reply,

Did you have some news about my issue ?

Thanks,

Hi,


Our concerned developer has evaluated it further. If you set EnableAJAX to true, the onSheetTabClick do ajax update the way. Gridweb will only refresh itself, it will not affect other parts of the page. It is common by design. All the modern pages use ajax in that way. We are not sure what is your actual issue you find.

Thank you.

Hi,

I understand the principle of Ajax in the refresh of the control itself. That is not which makes me puzzled. I just try to find a way to refresh other parts of the page from GridWeb Ajax Request. The sample project I have sent to you illustrate perfectly my needs.

Moreover even if I move the UpdatePanel around the GridWeb it will not be updated when a GridWeb event is fired

As the GridWeb seems to not be able to trigger an UpdatePanel at all when Ajax is activated, maybe your developer have an advice for me to do what I want.

Thanks

Hi,

As a workaround, is there a possibility to make the OnSheetTabClick event generates a full postback even if EnableAjax is set to true ?

It will allow me to use OnCellSelectedAjaxCallBackClientFunction and bypass my refresh issue.

Thanks,

Hi,

I have found a workaround to bypass my refresh issue.

I just added inside the gridajaxcallback2() function (acwmain.js) the following code :

function gridajaxcallback2() {
if (this.ajaxXmlHttp != null) {
__doPostBack(’<%= UpdatePanelToRefreshOnTabClick.UniqueID %>’, ‘’);

}
}

It is obviously a temporary solution because it will not be practical each time we have to perform an update of the GridWeb control.

I’m still waiting your reply,

Thanks,

Hi,


Well, we are still evaluating your issue “CELLSNET-41631”. I think you may use your devised workaround if it suits you a bit as I am afraid, we have not found any solution to this or it might be impossible due to certain restrictions.

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

Thanks,


Hi,

Thanks for using Aspose.Cells for GridWeb.

We have closed this thread as Won’t fix as these are unreasonable requirements. If you face any other issue, please post your requirements in a separate thread. We will look into your issues and help you asap.