hey everyone,
i have a radgrid.i am using an external button for perfoming delete on selected grid row.i have shown an alert on client side if no row is selected on button click--
how can i achieve that if no row is selected then the above function runs and if a row is selected then show a confirm box?..
this is my button--
Thanks
Amit
i have a radgrid.i am using an external button for perfoming delete on selected grid row.i have shown an alert on client side if no row is selected on button click--
function
selectedItems()
{
var
MasterTable = $find(
"<%=RadGrid1.ClientID%>"
).get_masterTableView();
var
selectedItemsCount = MasterTable.get_selectedItems().length;
if
(selectedItemsCount == 0) {
alert(
"You must select a grid row first before processing DELETE!!"
);
return
false
;
}
}
this is my button--
<asp:Button ID=
"btnDelete"
runat=
"server"
Style="margin-right: 25px; color: black;
font-weight: bold; margin-left: 25px
" Text="
Delete
" Width="
75px
" OnClientClick="
javascript:
return
selectedItemsd();"
OnClick=
"btnDelete_Click"
CausesValidation=
"false"
/>
Thanks
Amit