<%@ Page Title="" Language="VB" MasterPageFile="~/intranet/IT/CM/MasterPages/CM.master" AutoEventWireup="false" CodeFile="cm.aspx.vb" Inherits="intranet_IT_CM_cm" %><%@ Register src="controls/LogEntryListing.ascx" tagname="LogEntryListing" tagprefix="uc3" %><asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div style="width:100%"> <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" CausesValidation="False" SelectedIndex="1" Skin="WebBlue"> <Tabs> <telerik:RadTab runat="server" Text="Request Log" > </telerik:RadTab> </Tabs> </telerik:RadTabStrip> <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0"> <telerik:RadPageView ID="RadPageView1" runat="server"> <uc3:LogEntryListing ID="LogEntryListing1" runat="server" /> </telerik:RadPageView> </telerik:RadMultiPage> </div></asp:Content><%@ Control Language="VB" AutoEventWireup="false" CodeFile="LogEntryListing.ascx.vb" Inherits="intranet_IT_CM_controls_LogEntryListing" %><telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"><script type="text/javascript"> function ShowLogEntryForm(entryId) { window.radopen("LogEntry.aspx?entrytId=" + entryId, "EditLogEntry"); return false; }</script></telerik:RadCodeBlock> <br /><asp:Repeater ID="Repeater1" runat="server"> <ItemTemplate> <div style="width:980px;"> <div style="width:60%;float:left;padding-top:10px;padding-bottom:10px;"><asp:Label CssClass="LabelStyle" ID="lblRequestorName" Text="Project Log Entry Added By: " runat="server" ></asp:Label></div> <div style="width:40%;float:left;padding-top:10px;padding-bottom:10px;"><asp:Label CssClass="LabelStyle" ID="lblRequestDate" Text="Date Entry added: " runat="server" ></asp:Label><%# DataBinder.Eval(Container.DataItem, "EntryDate")%></div> </div> <div style="width:980px;float:left;clear:both;padding-bottom:10px"> <asp:Label CssClass="LabelStyle" ID="lblLogEntry" Text="" runat="server" ></asp:Label><%# DataBinder.Eval(Container.DataItem, "Entry")%> </div> <div style="width:980px;float:left;clear:both;padding-bottom:30px"> <asp:LinkButton ID="lbEditRequest" runat="server" style="cursor:hand;" ToolTip="Edit This Request" Text="" CausesValidation="false" > <asp:Image ID="imgEdit" runat="server" ImageUrl="https://webapps1.richland2.org/images/editicons/pencil.png" Width="12" Height="12" visible="true"/> </asp:LinkButton> <asp:Image ID="Image3" runat="server" ImageUrl="https://webapps1.richland2.org/images/spacers/spacer.gif" Width="3" Height="1" visible="true"/> <asp:LinkButton ID="lbDeleteRequest" runat="server" style="cursor:hand;" ToolTip="Delete this request" Text="" CausesValidation="false" CommandName="deleterequest" OnClientClick="return confirm('Do you really want to delete this request from the system?\n\n This action cannot be undone.');" > <asp:Image ID="Image2" runat="server" ImageUrl="https://webapps1.richland2.org/images/deleteicons/delete.png" Width="12" Height="12" visible="true"/> </asp:LinkButton><asp:Label CssClass="LabelStyle" ID="lblEntryId" Text='<%# DataBinder.Eval(Container.DataItem, "EntryId")%>' runat="server" Visible="false"></asp:Label> </div> </ItemTemplate> <AlternatingItemTemplate> <div style="width:980px;padding-left:3px;border:1px solid #000000;"> <div style="width:980px"> <div style="width:60%;float:left;padding-top:10px;padding-bottom:10px;"><asp:Label CssClass="LabelStyle" ID="lblRequestorName" Text="Project Log Entry Added By: " runat="server" ></asp:Label></div> <div style="width:40%;float:left;padding-top:10px;padding-bottom:10px;"><asp:Label CssClass="LabelStyle" ID="lblRequestDate" Text="Date Entry added: " runat="server" ></asp:Label><%# DataBinder.Eval(Container.DataItem, "EntryDate")%></div> </div> <div style="width:980px;float:left;clear:both;padding-bottom:10px;"> <asp:Label CssClass="LabelStyle" ID="lblLogEntry" Text="" runat="server" ></asp:Label><%# DataBinder.Eval(Container.DataItem, "Entry")%> </div> <div style="width:980px;float:left;clear:both;padding-bottom:30px"> <asp:LinkButton ID="lbEditRequest" runat="server" style="cursor:hand;" ToolTip="Edit This Request" Text="" CausesValidation="false" > <asp:Image ID="imgEdit" runat="server" ImageUrl="https://webapps1.richland2.org/images/editicons/pencil.png" Width="12" Height="12" visible="true"/> </asp:LinkButton> <asp:Image ID="Image3" runat="server" ImageUrl="https://webapps1.richland2.org/images/spacers/spacer.gif" Width="3" Height="1" visible="true"/> <asp:LinkButton ID="lbDeleteRequest" runat="server" style="cursor:hand;" ToolTip="Delete this request" Text="" CausesValidation="false" CommandName="deleterequest" OnClientClick="return confirm('Do you really want to delete this request from the system?\n\n This action cannot be undone.');" > <asp:Image ID="Image2" runat="server" ImageUrl="https://webapps1.richland2.org/images/deleteicons/delete.png" Width="12" Height="12" visible="true"/> </asp:LinkButton><asp:Label CssClass="LabelStyle" ID="lblEntryId" Text='<%# DataBinder.Eval(Container.DataItem, "EntryId")%>' runat="server" Visible="false"></asp:Label> </div> </div> </AlternatingItemTemplate></asp:Repeater><telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="WebBlue"> <Windows> <telerik:RadWindow ID="EditLogEntry" runat="server" Title="Editing Log Entry" Height="475px" Width="990px" Left="50px" ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true" KeepInScreenBounds="True"> </telerik:RadWindow> </Windows></telerik:RadWindowManager>I load radmenu from sitemap, now i like to disable one manu item - "ADMIN" on form load.
I tried the following code, but menuitem always returns null so it can never be disable.
RadMenuItem menuitem = mainMenu.FindItemByValue("ADMIN");
if (menuitem != null)
{
menuitem.Enabled =
false;
}
What i did wrong?
Thanks
| //custom button |
| RadToolBarButton customButton = new RadToolBarButton("Properties"); |
| //customButton.CssClass = "test_button"; |
| customButton.Value = "EditProperties"; |
| customButton.CommandName = "EditProperties"; |
| DocFileExplorer.ToolBar.Items.Add(customButton); |
| DocFileExplorer.ToolBar.ButtonClick += new RadToolBarEventHandler(toolBar_ButtonClick); |
| protected void toolBar_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e) |
| { |
| //your logic here |
| } |

<telerik:RadSplitter ID="RadSplitter2" runat="server" SplitBarsSize="" Orientation="Horizontal"> <telerik:RadPane ID="RadPane3" runat="server" Height="26px"> <telerik:RadMenu ID="radToolbar" runat="server" EnableSelection="False"> </telerik:RadMenu> </telerik:RadPane> <telerik:RadPane ID="RadPane8" runat="server"> <asp:Panel ID="pnlClaimSummary" runat="server" Visible="False"> <telerik:RadSplitter ID="RadSplitter7" runat="server" Orientation="Horizontal"> <telerik:RadPane ID="RadPane13" runat="server" Height="55px"> <table style="width: 100%;" cellspacing="0" border="0"> <tr> <td colspan="4" class="rgHeader" scope="col"> Claim Details </td> </tr> <tr class="rgFilterRow"> <td style="width: 25%;"> <span class="InquiryLevel1">Claim Number: </span> <asp:Label ID="lblClaimSummaryClaimNumber" runat="server" Text="Label"></asp:Label> </td> <td style="width: 25%;"> <span class="InquiryLevel1">Policy Number: </span> <asp:Label ID="lblClaimSummaryPolicyNumber" runat="server" Text="Label"></asp:Label> </td> <td style="width: 25%;"> <span class="InquiryLevel1">Loss Date: </span> <asp:Label ID="lblClaimSummaryLossDate" runat="server" Text="Label"></asp:Label> </td> <td style="width: 25%;"> <span class="InquiryLevel1">Occurrence: </span> <asp:Label ID="lblClaimSummaryLossOccurrence" runat="server" Text="Label"></asp:Label> </td> </tr> </table> </telerik:RadPane> <telerik:RadPane ID="RadPane14" runat="server"> <telerik:RadSplitter ID="RadSplitter8" runat="server"> <telerik:RadPane ID="RadPane15" runat="server"> <table> <tr> <td> <span class="InquiryLevel1">Loss Description:</span> </td> <td> <telerik:RadTextBox ID="txtLossDescription" runat="server" ReadOnly="True" TextMode="MultiLine" Rows="5"> </telerik:RadTextBox> </td> </tr> </table> </telerik:RadPane> <telerik:RadPane ID="RadPane16" runat="server"> <telerik:RadGrid ID="grdClaimAssignment" runat="server" AllowSorting="True" AutoGenerateColumns="False" GridLines="None" OnNeedDataSource="grdClaimAssignment_NeedDataSource"> <MasterTableView> <RowIndicatorColumn> <HeaderStyle Width="20px" /> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px" /> </ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="Name" HeaderText="Assignee Name" UniqueName="AssigneeName"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Role" HeaderText="Role" UniqueName="AssignmentRole"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="WhenAssigned" DataType="System.DateTime" HeaderText="Assignment Date" UniqueName="WhenAssigned"> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid> </telerik:RadPane> </telerik:RadSplitter> </telerik:RadPane> </telerik:RadSplitter> </asp:Panel> <asp:Panel ID="pnlDashboard" runat="server" Visible="False"> <telerik:RadSplitter ID="RadSplitter5" runat="server" Orientation="Horizontal"> <telerik:RadPane ID="radItemListPane" runat="server"> <telerik:RadGrid ID="radDashGrid" runat="server" AllowFilteringByColumn="True" AllowSorting="True" GridLines="None" Style="margin: 10px;" OnItemDataBound="radDashGrid_ItemDataBound" AutoGenerateColumns="False" OnItemCommand="radDashGrid_ItemCommand" OnPreRender="radDashGrid_PreRender" OnNeedDataSource="radDashGrid_NeedDataSource"> <MasterTableView DataKeyNames="ItemID"> <Columns> <telerik:GridBoundColumn DataField="ClaimNumber" HeaderText="Claim Number" UniqueName="ClaimNumber"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="PolicySymbol" HeaderText="Symbol" UniqueName="PolicySymbol"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="PolicyNumber" HeaderText="Policy Number" UniqueName="PolicyNumber"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="DateOfLoss" DataFormatString="{0:MM/dd/yyyy}" DataType="System.DateTime" HeaderText="Loss Date" UniqueName="DateOfLoss"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="LossOccurrence" HeaderText="Occurrence" UniqueName="column1" DataFormatString="{0:D2}" DataType="System.Int32"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ItemType" HeaderText="Item Type" UniqueName="ItemType"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="DueDate" DataFormatString="{0:MM/dd/yyyy hh:mm tt}" DataType="System.DateTime" HeaderText="Due Date" UniqueName="DueDate"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="IsRead" DataType="System.Boolean" HeaderText="Read" UniqueName="IsRead" Visible="False" AllowFiltering="False" AllowSorting="False" Display="False" Groupable="False" Reorderable="False" Resizable="False" ShowSortIcon="False"> </telerik:GridBoundColumn> </Columns> <SortExpressions> <telerik:GridSortExpression FieldName="DueDate" SortOrder="Ascending" /> </SortExpressions> </MasterTableView> <ClientSettings EnablePostBackOnRowClick="True" EnableRowHoverStyle="True"> <Selecting AllowRowSelect="True" /> <ClientEvents OnRowContextMenu="ShowDashboardContextMenu" /> </ClientSettings> </telerik:RadGrid> </telerik:RadPane> <telerik:RadSplitBar ID="RadSplitBar2" runat="server" CollapseMode="Forward"> </telerik:RadSplitBar> <telerik:RadPane ID="RadPane11" runat="server" Height="100%"> <asp:Panel ID="pnlDashboardDetailsContainer" runat="server"> <asp:Panel ID="pnlDashboardItemDetails" runat="server" Visible="false" Style="margin: 10px;" CssClass="RadGrid RadGrid_WebBlue"> <table style="width: 100%;" cellspacing="0" border="0"> <tr> <td colspan="4" class="rgHeader" scope="col"> Suspense Details </td> </tr> <tr class="rgFilterRow"> <td style="width: 25%;"> <span class="InquiryLevel1">Claim Number: </span> <asp:LinkButton ID="lnkClaimNumber" runat="server" CssClass="lkNorm" OnCommand="lnkClaimNumber_Command">ClaimNumber</asp:LinkButton> </td> <td style="width: 25%;"> <span class="InquiryLevel1">Policy Number: </span> <asp:Label ID="lblPolicyNumber" runat="server" Text="Label"></asp:Label> </td> <td style="width: 25%;"> <span class="InquiryLevel1">Loss Date: </span> <asp:Label ID="lblLossDate" runat="server" Text="Label"></asp:Label> </td> <td style="width: 25%;"> <span class="InquiryLevel1">Occurrence: </span> <asp:Label ID="lblOccurrence" runat="server" Text="Label"></asp:Label> </td> </tr> <tr> <td colspan="4"> <div style="margin-top: 10px;"> <table> <tr> <td> <span class="InquiryLevel1">Date Sent:</span> </td> <td> <telerik:RadDateInput ID="txtDateSent" runat="server" DateFormat="MM/dd/yyyy" DisplayDateFormat="MM/dd/yyyy" ReadOnly="True" SelectedDate="06/28/2010" Width="175"> </telerik:RadDateInput> </td> </tr> <tr> <td> <span class="InquiryLevel1">Sender:</span> </td> <td> <telerik:RadTextBox ID="txtFrom" runat="server" Text="Person" Width="300" ReadOnly="True"> </telerik:RadTextBox> </td> </tr> <tr> <td> <span class="InquiryLevel1">Message:</span> </td> <td> <telerik:RadTextBox ID="txtMessage" runat="server" ReadOnly="True" TextMode="MultiLine" Rows="6" Width="500" Text="Review information to ensure accuracy."> </telerik:RadTextBox> </td> </tr> </table> </div> </td> </tr> </table> </asp:Panel> </asp:Panel> </telerik:RadPane> </telerik:RadSplitter> </asp:Panel> </telerik:RadPane> </telerik:RadSplitter>I am using date picker control in my code.
[ <%@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebControls" TagPrefix="radCln" %>]
On page load event I am setting selected date property of datepicker control as current date.
RadDatePickerEndDate.SelectedDate =
DateTime.Now;
Whenever I select another date and then reset the web page through Ajax request I get following error:
'this.i3d.length' is null or not an object in RadControls\CALENDAR\Scripts\1_8_3\RadCalendar.js file.
Please advice.
Regards,
VM
Hi,
I am using the explorer (which is great) as a personal file space and file sharing app for my students to upload and download anywhere.
To stop users uploading and opening executables I need to have EnableOpenFile="false" and then use a seperate button control to initiate the download. This work OK by getting the file name using..
| function OnClientItemSelected(sender, args) |
| { |
| var textbox = $get("fileName"); |
| textbox.value = args.get_path(); |
| } |
And then in the onClick event of the button doing
| Dim filepath As String = Request.Form("fileName") |
| filepath.Replace("/", "\") |
| If Not filepath Is Nothing Then |
| If File.Exists(Server.MapPath(filepath)) Then |
| Dim filename As String = Path.GetFileName(filepath) |
| Response.Clear() |
| Response.ContentType = "application/octet-stream" |
| Response.AddHeader("Content-Disposition", _ |
| "attachment; filename=""" & filename & """") |
| Response.Flush() |
| Response.WriteFile(filepath) |
| Else |
| lblMsg.Text = "No such file exists" |
| End If |
| Else |
| lblMsg.Text = "Please select a file" |
| End If |
I read that we can access the toolbar and context menu using
| function findToolBar() |
| { |
| var oToolBar = $find("<%= FileExplorer1.ToolBar.ClientID %>"); |
| } |
| function findContextMenu() |
| { |
| // Get reference to the RdTreeView's context menu |
| var oTreeViewContexMenu = $find("<%= FileExplorer1.TreeView.ContextMenus[0].ClientID %>"); |
| // Get reference to the RadGrid's context menu |
| var oGridContexMenu = $find("<%= FileExplorer1.GridContextMenu.ClientID %>"); |
