This is going to be a bit of odd one but here s what I am trying to do. I have a aps.net page and on this page is a radgrid. The radgrid uses a Template for the Edit Form. In this template I have a radtab strip. On one tab is all the detail information for the record and the user can edit and save changes. On the other table is a fileExplorer. Now depending on which record is being entered the file paths need to be different, but for some reason when I am setting the ViewPath and UploadPaths in code it does not work, but if I set a static page in the html write up it work fine.
I am trying to set the folder on the Radgrid databound event.protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) { if (e.Item is GridEditableItem && e.Item.IsInEditMode) { RadFileExplorer marketingFiles = (RadFileExplorer)formItem.FindControl("FileExplorer1"); string clientID = Session["AdvisorClientID"].ToString(); string id = ((RadTextBox)editItem.FindControl("MarketingCode")).Text; if (!Directory.Exists(Server.MapPath("~/FileManager/") + clientID + "\\marketing\\" + id + "\\")) Directory.CreateDirectory(Server.MapPath("~/FileManager/") + clientID + "\\marketing\\" + id + "\\"); string[] folder = new string[] { Server.MapPath("~/FileManager/") + clientID + "\\marketing\\" + id + "\\"}; marketingFiles.Configuration.ViewPaths = folder; marketingFiles.Configuration.UploadPaths = folder; }<telerik:RadPageView ID="RadPageView2" runat="server" BorderStyle="Inset" BorderWidth="1px" BorderColor="LightBlue"> <telerik:RadFileExplorer runat="server" ID="FileExplorer1" Width="600px" Height="250px" AllowPaging="true" PageSize="20" Skin="WebBlue"> <Configuration EnableAsyncUpload="true" /></telerik:RadFileExplorer></telerik:RadPageView><telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" EnablePageHeadUpdate="False" OnAjaxRequestquest="RadAjaxManager1_AjaxRequest" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="FilterButton"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="RemoveFilterButton"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> <telerik:AjaxUpdatedControl ControlID="TypeListBox" /> <telerik:AjaxUpdatedControl ControlID="StatusListBox" /> <telerik:AjaxUpdatedControl ControlID="DescriptionTxt" /> <telerik:AjaxUpdatedControl ControlID="StartDate" /> <telerik:AjaxUpdatedControl ControlID="EndDate" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager>So, I am unable to assign a MultiLine Message as my Confirmation Text for a Delete ImageButton.
The below code, when not REM'd out, does not throw an error but when I hit Delete, the confirmation does not appear at all and it merely Deletes the record. If I use a single Line of text, it appears and prompts for confirmation.
Not a deal breaker for me but I thought I would mention it.
Private Sub RecipientsGrid_ItemCreated(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles RecipientsGrid.ItemCreated If TypeOf e.Item Is GridDataItem Then Dim item As GridDataItem = DirectCast(e.Item, GridDataItem) Dim DeleteBtn As GridButtonColumn = TryCast(RecipientsGrid.MasterTableView.GetColumn("DeleteOrganization"), GridButtonColumn) Dim DeleteMsg As New StringBuilder 'DeleteMsg.Append("Delete this Organization?") 'DeleteMsg.Append(ControlChars.NewLine) 'DeleteMsg.Append("Note: This will DELETE all Contacts for this Organization!") 'DeleteBtn.ConfirmText = DeleteMsg.toString DeleteBtn.ConfirmText = "DELETE ME!" End IfEnd Sub<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"> <center> <table> <tr> <td style="color:Blue;font-size:large"><strong>Bank Statement Reconciliation</strong><br /></td> </tr> <tr> <td> <asp:Label ID="accountLabel" runat="server" Font-Bold="true" Font-Size="Large" ForeColor="Blue"></asp:Label> </td> </tr> <tr> <td> <asp:Label ID="dateLabel" runat="server" Font-Bold="true" Font-Size="Large" ForeColor="Blue"></asp:Label> </td> </tr> <tr> <td> <asp:Button ID="backButton" runat="server" CssClass="bttnBack" onclick="backButton_Click" /> </td> </tr> <tr> <td><asp:Label ID="errorLabel" runat="server" Font-Bold="True" Font-Size="Large" Font-Underline="True" ForeColor="#990000"></asp:Label><br /></td> </tr> </table> </center></asp:Content><asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <script type="text/javascript"> function requestStart(sender, args) { if (args.get_eventTarget().indexOf("exportToExcel") >= 0) { args.set_enableAjax(false); } }</script><telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <ClientEvents OnRequestStart="requestStart"/> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="detailGrid"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="dbmotoGrid" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="detailGrid" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="totalsList" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="dbmotoGrid"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="dbmotoGrid" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="detailGrid" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="totalsList" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="WebBlue" /> <telerik:RadFormDecorator ID="formDec" runat="server" Skin="WebBlue" /><asp:Button ID="hiddenButton" OnClientClick="return false;" runat="server" style="display:none" visible="false" /><asp:Panel ID="panel1" runat="server" DefaultButton="hiddenButton"> <telerik:RadSplitter ID="splitter" runat="server" Height="600" Width="1500" > <telerik:RadPane ID="fullPane" runat="server" Height="300" Width="750"> <asp:Label ID="headerDbmoto" runat="server" Text="Open Records from AS400" Font-Size="Medium" Font-Bold="true" ForeColor="Blue"></asp:Label> <telerik:RadGrid ID="dbmotoGrid" OnItemCommand="dbmotoGrid_ItemCommand" ShowStatusBar="true" DataSourceID="DBMotoSource" AllowFilteringByColumn="true" ShowFooter="true" OnRowDrop="dbmotoGrid_OnRowDrop" runat="server" AutoGenerateColumns="False" PageSize="25" AllowSorting="True" AllowMultiRowSelection="true" EnableLinqExpressions="false" OnItemDataBound="dbmotoGrid_ItemDataBound" AllowPaging="True" GridLines="Vertical" ShowHeader="true" Skin="WebBlue" AlternatingItemStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" FilterItemStyle-HorizontalAlign="Center"> <ExportSettings ExportOnlyData="true" HideStructureColumns="true" FileName="AS400 Open Records" IgnorePaging="true" OpenInNewWindow="true" > <Excel Format="ExcelML"/> </ExportSettings> <ClientSettings AllowRowsDragDrop="true"> <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" /> <ClientEvents OnRowSelected="DbmotoRowSelected" OnRowDeselected="DbmotoRowSelected"/> </ClientSettings> <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle> <MasterTableView CommandItemSettings-RefreshImageUrl="" HierarchyLoadMode="Client" CommandItemSettings-RefreshText="Refresh" CommandItemDisplay="Top" Name="mainGrid" AllowAutomaticInserts="false" DataSourceID="DBMotoSource" DataKeyNames="CRBACT,CRCKDP,CRCNUM,CRCISO,CRCAMT" ClientDataKeyNames="CRCAMT,CRCKDP" AllowMultiColumnSorting="True" GridLines="Vertical"> <SortExpressions> <telerik:GridSortExpression FieldName="CRCISO" SortOrder="Ascending" /> </SortExpressions> <CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false" /> <CommandItemTemplate> <telerik:RadCodeBlock ID="dbmotoScripts" runat="server"> <script type="text/javascript"> </telerik:RadCodeBlock> <table align="left"> <tr> <td> <asp:Label ID="sumLabel" runat="server" ForeColor="White" Text="Selected Sum: " Font-Size="Large"></asp:Label> </td> </tr> </table> <table align="right"> <tr> <td> <asp:Button ID="voidButton" runat="server" Text="Void" CommandName="Void" style="cursor:pointer" OnClientClick="if(!CanVoid()) return true;" /> </td> <td> </td> <td> </td> <td> <asp:Button ID="exportToExcel" runat="server" Text="Export" CommandName="ExportToExcel" style="cursor:pointer" /> </td> <td> </td> <td> </td> <td> <asp:Button ID="refreshButton" runat="server" Text="Refresh" CommandName="Refresh" style="cursor:pointer" /> </td> </tr> </table> </CommandItemTemplate> <Columns> <telerik:GridTemplateColumn SortExpression="CRCKDP" HeaderText="Type" HeaderButtonType="TextButton" FilterDelay="8000" CurrentFilterFunction="EqualTo" DataField="CRCKDP" UniqueName="CRCKDP" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="true"> <ItemTemplate> <asp:Label ID="detailTypeLabelDbmoto" runat="server" Text='<%# Eval("typeText") %>'></asp:Label> </ItemTemplate> <FilterTemplate> <telerik:RadComboBox ID="detailTypeFilterDbmoto" runat="server" DataSourceID="typeSource" DataTextField="Text" DataValueField="Value" Width="60px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("CRCKDP").CurrentFilterValue %>' OnClientSelectedIndexChanged="SelectedIndexChangedDbmoto"> <Items> <telerik:RadComboBoxItem runat="server" Text="Types" Value="" /> </Items> </telerik:RadComboBox> <telerik:RadScriptBlock ID="filterScriptBlockDbmoto" runat="server"> <script type="text/javascript"> function SelectedIndexChangedDbmoto(sender, args) { var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); tableView.filter("CRCKDP", args.get_item().get_value(), "EqualTo"); } </script> </telerik:RadScriptBlock> </FilterTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn SortExpression="CRCNUM" HeaderText="Check #" HeaderButtonType="TextButton" FilterDelay="8000" CurrentFilterFunction="EqualTo" DataField="CRCNUM" UniqueName="CRCNUM" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="true"></telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="CRPAYE" HeaderText="Description" HeaderButtonType="TextButton" FilterDelay="8000" CurrentFilterFunction="Contains" DataField="CRPAYE" UniqueName="CRPAYE" AutoPostBackOnFilter="false" ShowFilterIcon="true" AllowFiltering="true"> <ItemStyle Wrap="false" HorizontalAlign="Left" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="CRCAMT" HeaderText="Amount" HeaderButtonType="TextButton" FilterDelay="8000" CurrentFilterFunction="EqualTo" DataField="CRCAMT" UniqueName="CRCAMT" AutoPostBackOnFilter="false" ShowFilterIcon="true" AllowFiltering="true" DataFormatString="{0:C}"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CRCISO" AllowFiltering="true" AutoPostBackOnFilter="false" SortExpression="CRCISO" UniqueName="CRCISO" FilterDelay="8000" DataFormatString="{0:MM/dd/yyyy}" HeaderText="Date" HeaderStyle-HorizontalAlign="Center"> <FilterTemplate> <table> <tr> <td align="center"> <telerik:RadDatePicker ID="RadDatePickerRecStart" Skin="WebBlue" runat="server" Width="100px" DateInput-EmptyMessage="Start Date" DbSelectedDate='<%# startDate %>' SelectedDate="12/15/2009" ClientEvents-OnDateSelected="FromRecStartSelected" > </telerik:RadDatePicker> </td> </tr> <tr> <td align="center"> <telerik:RadDatePicker ID="RadDatePickerRecEnd" Skin="WebBlue" runat="server" Width="100px" DateInput-EmptyMessage="End Date" DbSelectedDate='<%# endDate %>' SelectedDate="12/15/2010" ClientEvents-OnDateSelected="ToRecEndSelected"> </telerik:RadDatePicker> </td> </tr> </table> <telerik:RadScriptBlock ID="filterScriptBlockEntryDate" runat="server"> <script type="text/javascript"> </script> </telerik:RadScriptBlock> </FilterTemplate> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid> </telerik:RadPane> <telerik:RadSplitBar ID="splitbar" runat="server"></telerik:RadSplitBar> <telerik:RadPane ID="rightPane" runat="server" Height="300" Width="750"> <telerik:RadCodeBlock ID="clientCode" runat="server"> <script type="text/javascript"> </script> </telerik:RadCodeBlock> <asp:Label ID="detailRecordsLabel" runat="server" Text="Bank Statement Detail Records" Font-Size="Medium" Font-Bold="true" ForeColor="Blue"></asp:Label> <telerik:RadGrid ID="detailGrid" OnItemCommand="detailGrid_ItemCommand" ShowStatusBar="true" DataSourceID="detailSource" AllowFilteringByColumn="true" ShowFooter="true" OnRowDrop="detailGrid_OnRowDrop" runat="server" AutoGenerateColumns="False" PageSize="25" AllowSorting="True" AllowMultiRowSelection="true" EnableLinqExpressions="false" OnItemDataBound="detailGrid_ItemDataBound" AllowPaging="True" GridLines="Vertical" ShowHeader="true" Skin="WebBlue" AlternatingItemStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" FilterItemStyle-HorizontalAlign="Center"> <ExportSettings ExportOnlyData="true" FileName="BankStatementExport" HideStructureColumns="true" IgnorePaging="true" OpenInNewWindow="true" > <Excel Format="ExcelML" /> </ExportSettings> <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle> <ClientSettings> <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" /> <ClientEvents OnRowSelecting="RowSelecting" OnRowSelected="DetailRowSelected" OnRowDeselected="DetailRowSelected" /> </ClientSettings> <MasterTableView EditMode="PopUp" CommandItemSettings-RefreshImageUrl="" HierarchyLoadMode="Client" CommandItemSettings-RefreshText="Refresh" CommandItemDisplay="Top" Name="mainGrid" AllowAutomaticInserts="false" DataSourceID="detailSource" DataKeyNames="ID,account,Combined_Flag" ClientDataKeyNames="ID,status,Combined_Flag,amount,type" AllowMultiColumnSorting="True" GridLines="Vertical"> <CommandItemSettings ShowExportToExcelButton="true" /> <CommandItemTemplate> <table align="left"> <tr> <td> <asp:Label ID="bnkSumLabel" runat="server" ForeColor="White" Text="Selected Sum: " Font-Size="Large"></asp:Label> </td> </tr> </table> <table align="right"> <tr> <td> <asp:Button ID="addButton" runat="server" Text="Add New" CommandName="InitInsert" style="cursor:pointer" /> </td> <td> </td> <td> </td> <td> <asp:Button ID="combineButton" runat="server" Text="Combine" CommandName="Combine" style="cursor:pointer" OnClientClick="if(!IsMultiSelected()) return true;" /> </td> <td> </td> <td> </td> <td> <asp:Button ID="separateButton" runat="server" Text="Separate" CommandName="Separate" style="cursor:pointer" OnClientClick="if(!CanSeparate()) return true;" /> </td> <td> </td> <td> </td> <td> <asp:Button ID="exportToExcel" runat="server" Text="Export" CommandName="ExportToExcel" style="cursor:pointer" /> </td> <td> </td> <td> </td> <td> <asp:Button ID="refreshButton" runat="server" Text="Refresh" CommandName="Refresh" style="cursor:pointer" /> </td> </tr> </table> </CommandItemTemplate> <DetailTables> <telerik:GridTableView DataKeyNames="CRBACT,CRCKDP,CRCNUM,CRCISO,CRCAMT,CRSTM#" Name="reconcileGrid" ShowFooter="true" DataSourceID="recSource" Width="100%" GridLines="Vertical" BorderWidth="20" BorderColor="#cae4ff" runat="server" AllowPaging="false"> <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="CRSTM#" MasterKeyField="ID" /> </ParentTableRelation> <Columns> <telerik:GridTemplateColumn SortExpression="CRCKDP" HeaderText="Type" HeaderButtonType="TextButton" DataField="CRCKDP" UniqueName="CRCKDP" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="false"> <ItemTemplate> <asp:Label ID="recTypeLabel" runat="server" Text='<%# Eval("description") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn SortExpression="CRCNUM" HeaderText="Check #" HeaderButtonType="TextButton" DataField="CRCNUM" UniqueName="CRCNUM" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="false"></telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="CRPAYE" HeaderText="Description" HeaderButtonType="TextButton" DataField="CRPAYE" UniqueName="CRPAYE" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="false"> <ItemStyle Wrap="false" HorizontalAlign="Left" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="CRCAMT" HeaderText="Amount" HeaderButtonType="TextButton" DataField="CRCAMT" UniqueName="CRCAMT" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="false" DataFormatString="{0:C}"></telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="CRCISO" HeaderText="Date" HeaderButtonType="TextButton" DataField="CRCISO" UniqueName="CRCISO" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="false" DataFormatString="{0:MM/dd/yyyy}"></telerik:GridBoundColumn> <telerik:GridTemplateColumn AllowFiltering="false" UniqueName="unmatch"> <ItemTemplate> <asp:Button ID="unrecButton" runat="server" Text="Unmatch" CommandName="Unmatch" OnClientClick="if(!confirm('Are you sure you want to unmatch this record?')) return true;" /> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </telerik:GridTableView> </DetailTables> <Columns> <telerik:GridTemplateColumn SortExpression="Type" HeaderText="Type" HeaderButtonType="TextButton" FilterDelay="8000" CurrentFilterFunction="EqualTo" DataField="Type" UniqueName="Type" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="true"> <ItemTemplate> <asp:Label ID="detailTypeLabel" runat="server" Text='<%# Eval("typeText") %>' Visible='<%#!(Eval("status").ToString() == "U") %>'></asp:Label> <asp:Button ID="detailButton" CommandName="Edit" runat="server" Text='<%# Eval("typeText") %>' Visible='<%#(Eval("status").ToString() == "U") %>'></asp:Button> </ItemTemplate> <FilterTemplate> <telerik:RadComboBox ID="detailTypeFilter" runat="server" DataSourceID="typeSource" DataTextField="Text" DataValueField="Value" Width="60px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Type").CurrentFilterValue %>' OnClientSelectedIndexChanged="SelectedIndexChanged"> <Items> <telerik:RadComboBoxItem runat="server" Text="Types" Value="" /> </Items> </telerik:RadComboBox> <telerik:RadScriptBlock ID="filterScriptBlock" runat="server"> <script type="text/javascript"> function SelectedIndexChanged(sender, args) { var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); tableView.filter("Type", args.get_item().get_value(), "EqualTo"); } </script> </telerik:RadScriptBlock> </FilterTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn SortExpression="Location" HeaderText="Location" HeaderButtonType="TextButton" FilterDelay="8000" CurrentFilterFunction="EqualTo" DataField="Location" UniqueName="Location" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="true"> <FilterTemplate> <telerik:RadComboBox Height="300px" ID="locFilterBox" runat="server" DataSourceID="locSource" DataTextField="lmloc" DataValueField="lmloc" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Location").CurrentFilterValue %>' OnClientSelectedIndexChanged="SelectedIndexChangedLoc" Width="50px"> <Items> <telerik:RadComboBoxItem Value="" Text="All" /> <telerik:RadComboBoxItem Value="0" Text="0" /> </Items> </telerik:RadComboBox> <telerik:RadScriptBlock ID="filterScriptBlockLocation" runat="server"> <script type="text/javascript"> function SelectedIndexChangedLoc(sender, args) { var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); tableView.filter("Location", args.get_item().get_value(), "EqualTo"); } </script> </telerik:RadScriptBlock> </FilterTemplate> </telerik:GridBoundColumn> <telerik:GridTemplateColumn SortExpression="Check_Num" HeaderText="Check #" HeaderButtonType="TextButton" FilterDelay="8000" CurrentFilterFunction="EqualTo" DataField="Check_Num" UniqueName="Check_Num" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="true"> <ItemTemplate> <asp:Label ID="checkNumLabel" runat="server" Text='<%# Eval("check_num") %>'></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn SortExpression="Amount" HeaderText="Amount" HeaderButtonType="TextButton" FilterDelay="8000" CurrentFilterFunction="EqualTo" DataField="Amount" UniqueName="Amount" AutoPostBackOnFilter="false" ShowFilterIcon="true" AllowFiltering="true" DataFormatString="{0:C}"></telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Date" HeaderText="Date" HeaderButtonType="TextButton" DataField="Date" UniqueName="Date" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="true" DataFormatString="{0:MM/dd/yyyy}"> <FilterTemplate> <table> <tr> <td align="center"> <telerik:RadDatePicker ID="detailStart" Skin="WebBlue" runat="server" Width="100px" DateInput-EmptyMessage="Start Date" DbSelectedDate='<%# detailStartDate %>' SelectedDate="12/15/2009" ClientEvents-OnDateSelected="detailStartSelected" > </telerik:RadDatePicker> </td> </tr> <tr> <td align="center"> <telerik:RadDatePicker ID="detailEnd" Skin="WebBlue" runat="server" Width="100px" DateInput-EmptyMessage="End Date" DbSelectedDate='<%# detailEndDate %>' SelectedDate="12/15/2010" ClientEvents-OnDateSelected="detailEndSelected"> </telerik:RadDatePicker> </td> </tr> </table> <telerik:RadScriptBlock ID="filterScriptBlockEntryDate" runat="server"> </FilterTemplate> </telerik:GridBoundColumn> <telerik:GridTemplateColumn SortExpression="Status" HeaderText="Status" HeaderButtonType="TextButton" FilterDelay="8000" CurrentFilterFunction="EqualTo" DataField="Status" UniqueName="Status" AutoPostBackOnFilter="false" ShowFilterIcon="false" AllowFiltering="true"> <ItemTemplate> <asp:Label ID="detailStatusLabel" runat="server" Text='<%# Eval("statusText") %>'></asp:Label> </ItemTemplate> <FilterTemplate> <telerik:RadComboBox ID="statusFilter" runat="server" DataSourceID="statusSource" DataTextField="text" DataValueField="value" Width="90px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Status").CurrentFilterValue %>' OnClientSelectedIndexChanged="SelectedIndexChanged2"> <Items> <telerik:RadComboBoxItem runat="server" Text="Statuses" Value="" /> </Items> </telerik:RadComboBox> <telerik:RadScriptBlock ID="filterScriptBlock2" runat="server"> <script type="text/javascript"> function SelectedIndexChanged2(sender, args) { var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); tableView.filter("Status", args.get_item().get_value(), "EqualTo"); } </script> </telerik:RadScriptBlock> </FilterTemplate> </telerik:GridTemplateColumn> </Columns> <EditFormSettings EditFormType="Template" PopUpSettings-Modal="true" InsertCaption="Insert Bank Statement Detail Record" CaptionFormatString="Edit Bank Statement Detail Information"> <FormTemplate> <center> <table> <tr> <td align="right">Type: </td> <td align="left"> <telerik:RadComboBox ID="typeBox" runat="server" SelectedValue='<%# Bind("type") %>' DataSourceID="typeSource" DataTextField="Text" ValidationGroup="insert" DataValueField="Value" Width="60px" AppendDataBoundItems="true" CausesValidation="true"> </telerik:RadComboBox> </td> <td align="left"><asp:CompareValidator ValueToCompare="Types" Operator="NotEqual" ControlToValidate="typeBox" ValidationGroup="insert" ErrorMessage="* Must select a value" runat="server" ID="typeBoxValidator"></asp:CompareValidator> </td> </tr> <tr> <td align="right">Location: </td> <td align="left"> <telerik:RadComboBox Height="300px" SelectedValue='<%# Bind("location") %>' ID="locBox" runat="server" ValidationGroup="insert" DataSourceID="locSource" DataTextField="lmloc" DataValueField="lmloc" AppendDataBoundItems="true" Width="50px"> <Items> <telerik:RadComboBoxItem Value="0" Text="N/A" /> <telerik:RadComboBoxItem Value="0" Text="0" /> </Items> </telerik:RadComboBox> </td> </tr> <tr> <td align="right">Check Num: </td> <td align="left"><telerik:RadNumericTextBox ID="checkBox" Text='<%# Bind("check_num") %>' runat="server" ValidationGroup="insert" NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="" CausesValidation="true"></telerik:RadNumericTextBox></td> <td align="left"><asp:RequiredFieldValidator ID="checkBoxValidator" runat="server" ControlToValidate="checkBox" ValidationGroup="insert" ErrorMessage="* Cannot be empty" Display="Dynamic" ForeColor="Red"></asp:RequiredFieldValidator></td> </tr> <tr> <td align="right">Amount: </td> <td align="left"><telerik:RadNumericTextBox ID="amountBox" Text='<%# Bind("amount") %>' runat="server" CausesValidation="true" ValidationGroup="insert" DataType="double"></telerik:RadNumericTextBox></td> <td align="left"><asp:RequiredFieldValidator ID="amountBoxValidator" runat="server" ControlToValidate="amountBox" ErrorMessage="* Cannot be empty" ValidationGroup="insert" Display="Dynamic" ForeColor="Red"></asp:RequiredFieldValidator></td> </tr> <tr> <td align="right">Post Date: </td> <td align="left"><telerik:RadDatePicker ID="postDatePicker" DbSelectedDate='<%# Bind("date") %>' runat="server" ValidationGroup="insert" ></telerik:RadDatePicker></td> <td align="left"><asp:RequiredFieldValidator ID="postDatePickerValidator" runat="server" ControlToValidate="postDatePicker" ValidationGroup="insert" ErrorMessage="* Select a date " Display="Dynamic" ForeColor="Red"></asp:RequiredFieldValidator></td> </tr> <tr> <td align="right"><asp:Label ID="StatusLabel" runat="server" Visible='<%# (Container is GridEditFormInsertItem) ? false : true %>' Text="Status:"></asp:Label></td> <td align="left"><asp:CheckBox ID="VoidCheckBox" runat="server" Visible='<%# (Container is GridEditFormInsertItem) ? false : true %>' Text="Void" /></td> </tr> <tr> <td colspan="2" align="center"> <table> <tr> <td align="right"> <asp:Button ID="insertDetailButton" CommandName='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server" CausesValidation="true" ValidationGroup="insert"></asp:Button> </td> <td align="left"> <asp:Button ID="detailCancelButton" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button> </td> </tr> </table> </td> </tr> </table> </center> </FormTemplate> </EditFormSettings> </MasterTableView> </telerik:RadGrid> </telerik:RadPane> </telerik:RadSplitter></asp:Panel></asp:Content><asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server"></asp:Content>Dim baseDire As String = Server.MapPath("~/MyFILES/")If IO.Directory.Exists(baseDire & Request("Req_ID").ToString()) = False Then IO.Directory.CreateDirectory(baseDire & Request("Req_ID").ToString()) End IfFor Each file As UploadedFile In UploadPropDoc.UploadedFiles Dim bytes(file.ContentLength - 1) As Byte file.InputStream.Read(bytes, 0, file.ContentLength) 'Save the File to the disk file.SaveAs(baseDire + file.GetName()) Nextfile.SaveAs(baseDire + file.GetName())
function OnClientSelectionChange(editor, args) { var tool = editor.getToolByName("RealFontSize"); if (tool ) { setTimeout(function () { debugger; var value = tool.get_value(); if (!value || value.indexOf('pt') >= 0) return; value.replace('px', ''); var newSize = parseInt(value) * 0.75; if (newSize.toString().indexOf('.25') >= 0) { newSize -= 0.25; } else if (newSize.toString().indexOf('.75') >= 0) { newSize += 0.25; } tool.set_value(newSize + 'pt'); }, 0); } }
