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

Free Support Forum - aspose.com

Cell ID


Can I get the value of the cell in the client side by document.getElementById("GridWeb1_9#10).value?


Is there any ways I can get the value of any cell (not just the active cell) , like using J11 or GridWeb1_10#9 ? I mean any means other than passing row and column? Thank you very much.

Hi,

Well, there is no such flexibility available (document.getElementById("GridWeb1_9#10).value), we will check if we can support it.

I think you may try some workaround if it fits your need.

.cs file

protected void Page_Load(object sender, EventArgs e)

{

// Put user code to initialize the page here

if (!IsPostBack)

{

GridWeb1.WebWorksheets[0].Cells["J11"].PutValue("Hello world!");

GridWeb1.Attributes["cellval"] = GridWeb1.WebWorksheets[0].Cells["J11"].StringValue;

}

}

in .html source (javascript code)

<body>

<form id="form1" runat="server">

<div>

<agw:GridWeb id="GridWeb1" runat="server" XhtmlMode="true" Height="226px" OnSubmitClientFunction = "onSubmit"></agw:GridWeb>

</div>

</form>

<script language="javascript">

function onSubmit(arg, cancelEdit)

{

var cval = GridWeb1.cellval;

window.alert(cval);

}

</script>

</body>

Thank you.


I’ll try this. Thank you.

Hi,

You may get cell's value at client side just like this:

var value = GridWeb1.getCellValue(row, column); // row and column are 0 based

or:

var cell = GridWeb1.getCell(row, column);

var value = GridWeb1.getCellValueByCell(cell);

For more details, please look into the Client Scripting Demos of the GridWeb.

Thank you.