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

Free Support Forum - aspose.com

Update gridweb before I save it

If I created an outside button for saving gridweb.
And after I edit the cell, the cell will update into ‘gridweb’ untilI I clicked somewhere in gridweb.
If I didn’t did this action and just click that outside button to try to save it.

That cell value would not update to the saving result.

  1. cell value = ‘abc’
  2. edit cell value to ‘xyz’ in portlet
  3. I didn’t click somewhere inside gridweb.
  4. click outside savebutton
  5. the saved result will show ‘abc’ but not ‘xyz’ (didn’t update to com.aspose.gridweb)

@Gino1010

Thanks for using Aspose APIs.

We have tested your issue with the following sample code with your provided steps and it worked fine.

Please download the complete Sample JSP GridWeb Project and run it with Tomcat Server and perform your steps and you will find, it is working fine.

If you still find an issue, please provide us your own project which could help us replicate your issue.

Here is the code of the Test.jsp file.

JSP

<%@page language="java" contentType="text/html; charset=UTF-8" import="com.aspose.gridweb.*"  pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<base href="<%=basePath%>">
<script type="text/javascript" language="javascript" src="grid/acw_client/acwmain.js"></script>
<script type="text/javascript" language="javascript" src="grid/acw_client/lang_en.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

<title>Aspose.Cells.GridWeb for Java - Sample JSP Page</title>
<%
//Print GridWeb version on Console
System.out.println("Aspose.Cells.GridWeb for Java Version: " + GridWebBean.getVersion());

System.out.println(path);
System.out.println(basePath);

ExtPage BeanManager=ExtPage.getInstance();

GridWebBean gridweb=BeanManager.getBean(request);
out.println(gridweb.getHTMLHead());

%>
</head>
<body>
<%
gridweb.setReqRes(request, response);
gridweb.setWidth(Unit.Pixel(900));
gridweb.setHeight(Unit.Pixel(400));

String filePath = application.getRealPath("file/sampleExcel.xlsx");
gridweb.importExcelFile(filePath);

gridweb.setEnableAJAX(true);
gridweb.prepareRender();
out.print(gridweb.getHTMLBody());
%>

</body>
</html>