Hi,
i want to prevent file deletion on click of "Cancel" from confirmation alert
<telerik:RadAsyncUpload ID="radUpload" runat="server" OnClientValidationFailed="validationFailed" TemporaryFileExpiration="5" OnClientFileSelected="fileSelected" OnClientDeleting="fileDelete" OnClientFileUploaded ="fileUploaded">
</telerik:RadAsyncUpload>
function fileDelete(sender, args) {
if (confirm("Are you sure to Delete the record?")) {
args._cancel = false;
}
else {
args.set_cancel(true);
//args._cancel = true;
//sender._cancelEvent();
}
}
How to prevent file deletion on click of "Cancel" button.
On click of "Cancel" it is not not deleting from row, but actually file is deleted from control. So on click of Cancel button i want to prevent the file delete from control also.
Thanks,
Chandra.T
<telerik:RadFileExplorer runat="server" ID="FileExplorer1" Width="500px" Height="500px" OnClientItemSelected="OnClientItemSelected" > <Configuration ViewPaths="~/Media/Cnsrts/" MaxUploadFileSize="200000000" UploadPaths="~/Media/Cnsrts/" DeletePaths="~/Media/Cnsrts/" /> </telerik:RadFileExplorer>
<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31BF3856AD364E35" culture="neutral" /> <bindingRedirect oldVersion="1.0.61025.0" newVersion="3.5.0.0"/> </dependentAssembly> </assemblyBinding> </runtime><telerik:GridHyperLinkColumn DataNavigateUrlFields="Email1" UniqueName="Email1"
DataNavigateUrlFormatString="mailto:{0}" DataTextField="Name" HeaderText="Reviewer" SortExpression="Email1" ShowFilterIcon="false"
ShowSortIcon="false" AutoPostBackOnFilter="true" />System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Data.SqlClient.SqlException: Invalid column name 'Name'.
<telerik:GridBoundColumn HeaderText="Column1" SortExpression="Column1" DataField="Column1" UniqueName="Column1" DataType="System.Decimal" DataFormatString="{0:$###,##0.00}" Aggregate="Sum" ItemStyle-Wrap="true" HeaderStyle-Wrap="false" FooterText="Total Column1: "> <ItemStyle HorizontalAlign="Right" Wrap="True" /> <FooterStyle HorizontalAlign="Right" Wrap="True" /> </telerik:GridBoundColumn>
<telerik:RadListView ID="listViewProducts" runat="server" onneeddatasource="listViewProducts_NeedDataSource" ItemPlaceholderID="ProductsHolder" DataKeyNames="ProductCatalogID" Width="1200px"> <AlternatingItemTemplate> <div class="rlvA" style="height: 150px; width: 220px; margin-top: 5px; margin-left: 5px; margin-right: 5px; margin-bottom: 5px; padding-left: 15px;"> <asp:Panel ID="pnl" runat="server" Width="220px" CssClass="header4" > <b> <%#Eval("Products")%></b> <div style="padding-left:20px;padding-top:20px;" > <asp:ImageButton ID="ImageButton1" ImageUrl="~/Images/Product.jpg" PostBackUrl='<%# Eval("Link")%>' runat="server" /> </div> </asp:Panel> </div> </AlternatingItemTemplate> <ItemTemplate> <div class="rlvI" style="height: 150px; width: 220px; margin-top: 5px; margin-left: 5px; margin-right: 5px; margin-bottom: 5px; padding-left: 15px;"> <asp:Panel ID="pnl" runat="server" Width="220px" CssClass="header4"> <b><%#Eval("Products")%></b> <div style="padding-left:20px;" > <asp:ImageButton ID="btnSample" ImageUrl="~/Images/Product.jpg" PostBackUrl='<%# Eval("Link")%>' runat="server" /> </div> </asp:Panel> </div> </ItemTemplate> <EmptyDataTemplate> <div class="RadListView RadListView_Windows7"> <div class="rlvEmpty"> There are no items to be displayed.</div> </div> </EmptyDataTemplate> <LayoutTemplate> <div class="RadListView RadListViewFloated RadListView_Windows7"> <div class="rlvFloated rlvAutoScroll"> <div id="ProductsHolder" runat="server"> </div> </div> <telerik:RadDataPager ID="RadDataPager1" runat="server" PageSize="7"> <Fields> <telerik:RadDataPagerButtonField FieldType="Numeric" /> </Fields> </telerik:RadDataPager> </div> </LayoutTemplate> </telerik:RadListView>