if u want disable the textbox which is in grid acco. to checkbox then you should write this code for i=0 to gridview.row.count-1 if ctype(gridview.rows(i).findcontrol("checkbox"),checkbox).checked=true then ctype(gridview.rows(i).findcontrol("textbox"),visible).checked=false else ctype(gridview.rows(i).findcontrol("textbox"),visible).checked=false end if next