I my code bellow in the delete button i have
An example on how to check if any check boxes are checked from client side would be great.
OnClientClick="return confirm('Are you sure you want to delete?')
and it works great. However if no check boxes are checked and delete button is pressed i want to display different validation message. An example on how to check if any check boxes are checked from client side would be great.
<telerik:RadGrid GridLines="None" ID="grdInventory" AllowMultiRowSelection="True"Style="border: 1" runat="server" AllowPaging="True" AllowSorting="True" PageSize="10"Width="95%" Height="220px" AllowAutomaticDeletes="True" EnableLinqExpressions="false"OnNeedDataSource="grdInventory_NeedDataSource" OnItemCommand="grdInventory_ItemCommand"><MasterTableView AutoGenerateColumns="False" Width="100%" CommandItemDisplay="Bottom" DataKeyNames="Id"> <CommandItemTemplate> <div style="padding: 5px 5px;"> <asp:LinkButton ID="btnAdd" runat="server" OnClick="btnAdd_Click">Add</asp:LinkButton> <asp:LinkButton ID="btnDelete" runat="server" OnClientClick="return confirm('Are you sure you want to delete?');" OnClick="btnDelete_Click"> Delete</asp:LinkButton> </div> </CommandItemTemplate> <Columns> <telerik:GridClientSelectColumn UniqueName="SelectColumn"> <HeaderStyle Width="30px" /> </telerik:GridClientSelectColumn> <telerik:GridBoundColumn DataField="SizeName" DataType="System.String" HeaderText="Size" UniqueName="SizeName"> <HeaderStyle Width="100px" /> <ItemStyle Wrap="False" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataFormatString="{0:d}" DataField="Date" DataType="System.DateTime" HeaderText="Reserved Date" SortExpression="Date" UniqueName="Date"> <HeaderStyle Width="100px" /> <ItemStyle Wrap="False" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Available" DataType="System.String" HeaderText="Available" UniqueName="Available"> <HeaderStyle Width="100px" /> <ItemStyle Wrap="False" /> </telerik:GridBoundColumn> <telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton" ConfirmText="Are you sure you want to delete?" UniqueName="DeleteColumn" ImageUrl="../../Images/MediaTree/DeleteIcon.png"> <HeaderStyle Width="30px" /> </telerik:GridButtonColumn> </Columns></MasterTableView></telerik:RadGrid>