Now, what I need to do is to display the corresponding data information when I click a row in the DataGrid. When I double-click the same row, the delete dialog box is displayed. What should I do. Since the clicking problem is simple, I will not elaborate on it anymore. Next I will explain how double-click events are implemented.
The itemdatabound event of the DataGrid is used here. CodeAdd to the required ProgramDouble-click. The detailed source code is as follows:
Private void maid (Object sender, system. Web. UI. webcontrols. datagriditemeventargs E)
{
If (E. item. itemtype = listitemtype. ITEM) | (E. item. itemtype = listitemtype. alternatingitem) | (E. item. itemtype = listitemtype. selecteditem ))
{
E. Item. Attributes. Add ("ondblclick", "javascript: Return confirm ('Confirm to delete" + E. Item. cells [1]. Text + "? ');");
}
}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.