在Datagrid_ItemCreated事件中.
Select Case e.Item.ItemType
Case ListItemType.Item, ListItemType.AlternatingItem, ListItemType.EditItem
Dim myRejectButton As Button
myRejectButton = e.Item.FindControl( "btnReject ")
myRejectButton.Text = "Reject "
myRejectButton.Attributes.Add( "onclick ", "showModalDialog( './Controls/RejectReason.aspx?id= ', 'Reject Reason '); ")
End Select
---------------------------------------------
现在我想把datagrid中某一列值传给id.
请问有什么好的办法呢.
------解决方案--------------------------------------------------------
myDeleteButton.Attributes.Add( "onClick ", "if (!window.confirm( ' 'Are you sure delete? ')){return false;} ")
------解决方案--------------------------------------------------------
for(int i = 0; i < booklist.Items.Count ; i++)
{
booklist.Items[i].Cells[j].Text;
}
是你要获取的列所在的列数