| |

VerySource

 Forgot password?
 Register
Search
View: 805|Reply: 2

problem with datagrid "delete" popup dialog

[Copy link]

4

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-2 21:20:01
| Show all posts |Read mode
datagrid used when adding "delete"
 dim button as linkbutton
    button = ctype (e.item.cells (3) .controls (0), linkbutton)
    button.attributes.add ("onclick", "return confirm ('que ren shan chu?');") to add a pop-up box Now the "delete" I added is an imagebutton, not a linkbutton, which is done under the template template
  Can't get out ??
Reply

Use magic Report

0

Threads

24

Posts

20.00

Credits

Newbie

Rank: 1

Credits
20.00

 China

Post time: 2020-1-2 21:48:01
| Show all posts
VS2005 added directly in the HTML code page
<asp: Imagebutton runat = "server" id = "delbtn" OnClientClick = "return confirm ('Are you sure you want to delete?');" />
Reply

Use magic Report

0

Threads

41

Posts

13.00

Credits

Newbie

Rank: 1

Credits
13.00

 China

Post time: 2020-1-3 20:24:01
| Show all posts
private void dgrdAttachment_ItemDataBound (object sender, DataGridItemEventArgs e)
{
// Delete a dialog box before deleting for users to confirm
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem
|| e.Item.ItemType == ListItemType.SelectedItem)
{
ImageButton imgbtn1 = (ImageButton) e.Item.FindControl ("imgbtn_Delete") as ImageButton;
Ranch
imgbtn1.Attributes.Add ("onclick", "return confirm (` `que ren shan chu? ');");
Ranch
}
}
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list