F: How to implement Click a line (multi-column) in DataGrid to pass a ID to the second page shows its specific content, do not n

xiaoxiao2021-03-06  70

Write in the DataGrid ItemDatabase

private void DataGrid1_ItemDataBound (object sender, DataGridItemEventArgs e) {if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item) {e.Item.Attributes.Add ( "onclick", " WINDOW.OPEN ('TARGET.ASPX? ID = " DataGrid1.DataKeys [E.Item.itemindex] .tostring () "', '_ blank') ");}} is not tested, but it is given to the line plus one Onclick client event

转载请注明原文地址:https://www.9cbs.com/read-93678.html

New Post(0)