有个itemTemplate,里面是个linkbutton,
在它的事件里
linkbutton lbtn1=(linkbutton)sender
GridView gv1=(GridView)lbtn1.parent.parent
行索引:gv1.RowIndex
第一个parent 是指模板?lbtn1.parent.gettype看看.第二個指gridview
有个itemTemplate,里面是个linkbutton,
在它的事件里
linkbutton lbtn1=(linkbutton)sender
GridView gv1=(GridView)lbtn1.parent.parent
行索引:gv1.RowIndex
第一个parent 是指模板?lbtn1.parent.gettype看看.第二個指gridview