Attach "onfocusout" to the textbox in TemplateColumn and pass the ItemIndex. Now in the client event handler, access the row using ItemIndex passed and get the cell value to calculate result. Use findControl() method to get reference to textbxox ad set the text.