9CBS - Document Center - .NET title to DataGrid cell line Add double-click event hbzxf (original) keyword DataGrid
Add Double-Click Event HBZXF (A Hao) now I need to do the function that I need to do when I click on the DataGrid a line, when you double-click this same line, pop up the delete dialog, what should I do? What about it. Since the problem is simple, it is no longer elaborated. Let me talk about how to double-click the event. Here you can use the DataGrid ItemDatabase, we can add the following code to the desired program that you can implement the double click. Detailed source follows: private void DataGrid1_ItemDataBound (object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) {if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem ) || (E.Item.SelectedItem)) {E.Item.attributes.add ("OnDBLClick", "JavaScript: Return Confirm ('OK Delete" E.Item.cells [1] .text "? ');");}} Is actually a tip skill