This is a migrated thread and some comments may be shown as answers.

Get Cell Text after Clientside change

2 Answers 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tina
Top achievements
Rank 2
Tina asked on 16 Mar 2009, 12:42 PM
I am using the following code to update the value in a grid cell clientside:

 

var masterTable = $find("<%=dtInvoice.ClientID%>").get_masterTableView();

 

 

var amount = masterTable.getCellByColumnUniqueName(masterTable.get_dataItems()[row], "Apply")

 

 

if (amount)

 

{

amount.innerHTML = displayamt;

}

 

return false;

I have not figured out a way to pull the value on the serverside.  I tried pulling using the dataitem but it always returns empty.  What am i missing?

 

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 Mar 2009, 04:49 AM
Hi,

You will not be able to access the  client side changes on the server side  directly. A suggestion would be to use a hidden field to store this value and then access this in the server side. You could also perform a call back by making an AjaxRequest and handle your functionality in the RaisePostBackEvent.

Thanks,
Princy
0
Tina
Top achievements
Rank 2
answered on 17 Mar 2009, 11:59 AM
Thanks Princy for the response.  The idea was not to send a postback to update the cell value.  I will try the hidden field or I'll just put a textbox in the cell and update that and pull the value when I do a postback. 

Thanks again for the help.

Tina
Tags
Grid
Asked by
Tina
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Tina
Top achievements
Rank 2
Share this question
or