Javascript
Код: Выделить всё
var tempRowId;
function handleResetButton(rowId) {
tempRowId = rowId;
openPopUp(); //which opens a customize pop up div box
}
//when user triggers the Confirm Button in the customize pop up div box, will call doPostBack()
function doPostBack() {
var gridView = document.getElementById('');
var row = gridView.rows[tempRowId];
// Set the command arguments
row.cells[0].innerHTML ="Reset";
__doPostBack(gridView.id, 'RowCommand$' + tempRowId);
}
Код: Выделить всё
Код: Выделить всё
protected void gridView_RowCommand(Object sender, GridViewCommandEventArgs e)
{
var row = (GridViewRow)(((ImageButton)e.CommandSource).NamingContainer);
var rowNo = row.RowIndex;
var dataKey = gridView.DataKeys[rowNo];
int accountId= Convert.ToInt32(dataKey.Value.ToString());
switch (e.CommandName)
{
case "Reset":
//RUN CODE LOGIC
break;
}
}
Подробнее здесь: https://stackoverflow.com/questions/763 ... d-function
Мобильная версия