function doUpdate(recordId, fieldId)
It accepts the ID of the record to update, as well as the ID of the field to update. If you're wondering where the heck we get these values from when the update button is clicked, then take a look at the code that's uses to actually output the text box and update button to the browser:
On the line above, we are using the field name and its new value to build a string variable. This variable will be used in the SQL query we're about to build:
strQuery = "UPDATE <%=m_TableName%> SET "+strCriteria+" WHERE "+strPrimaryFieldName+" = '"+ReplaceAllQuotes(strPrimaryFieldValue)+"'";
UPDATE employee SET fname='Michael' WHERE emp_id='PMA42628M'
See how the where clause needs a unique field to differentiate between the records that it's updating? There's one catch to using our DynamicGrid class: the first field of the table you're working with MUST be a uniquely identified primary key. This isn't really a problem however, because most tables are already setup this way.
blnSuccess = SendRemoteRequest(strQuery);
var objXMLHTTP = new ActiveXObject("MSXML2.XMLHTTP");