A
Author
I am trying to tackle this problem, but have no clue.
In my asp.net 3.5 web application (in C#), I have a GridView, in
which, the leftmost column has checkboxes as selectors.
*Outside* of the GridView at the bottom of the page, I have buttons
such as
[View Details] [Edit] [Delete]
When a user clicks on the Delete button, I would like to do either one
(exclusive) of the following:
1) If nothing is selected in the GridView, I display a message like
"Oops, you must select one item."
2) If one or more items are selected, I want to have a client script
popup which says: Are you sure you want to delete the selected item
(s)? And delete only if the user click "Yes".
It seems to be pretty tricky to *conditionally* add this OnClientClick
event to the Delete button.
Any two cents from the experienced? Thanks a lot.
In my asp.net 3.5 web application (in C#), I have a GridView, in
which, the leftmost column has checkboxes as selectors.
*Outside* of the GridView at the bottom of the page, I have buttons
such as
[View Details] [Edit] [Delete]
When a user clicks on the Delete button, I would like to do either one
(exclusive) of the following:
1) If nothing is selected in the GridView, I display a message like
"Oops, you must select one item."
2) If one or more items are selected, I want to have a client script
popup which says: Are you sure you want to delete the selected item
(s)? And delete only if the user click "Yes".
It seems to be pretty tricky to *conditionally* add this OnClientClick
event to the Delete button.
Any two cents from the experienced? Thanks a lot.