Hi,
Thanks for your answer.
It's good information to me, but it still cannot resolve my problem.
By "the page changed" I mean the paging changed.
My program doesn't work when the pageindex was changed from page 1 to page 2,3,...
I cannot get any information from GridWeb cell by Javascription.
But when I return the pageindex to 1, it work again.
I list my program code in below, maybe it could helpful.
Server Side C# in VS2003
GridWeb1.Attributes.Add("onclick", "GridWeb1.updateData(); GridWeb1.submit(); g1Selected('GridWeb1',16); grid1click();");
Clinet Side BLOCKED SCRIPT
function g1Selected(gridnm,gcolcnt) {
var rcnt=eval(document.forms[0].tbG1NRec.value);
for (i=0; i<gcolcnt; i++) {
document.getElementById(gridnm+'_'+i.toString()+'#'+rcnt.toString()).style.backgroundColor='white';
}
if(event.srcElement.id.search(/GridWeb1_/i)>=0) {
var ipos = event.srcElement.id.search(/#/i);
if(ipos>=0) {
var recNo = event.srcElement.id.substr(ipos+1,5);
for (i=0; i<gcolcnt;i++) {
document.getElementById(gridnm+'_'+i.toString()+'#'+recNo.toString()).style.backgroundColor='skyblue';
}
}
}
}
variable rcnt is the cursor position last time.
variable recNo is the current cursor position.
grid1click() is the function save the virable recNo to Server Obj tbG1NRec.
best regards