| Telerik.Web.UI.Editor.CommandList["txtProductionNotes"] = function(commandName, editor, args) |
| { |
| var text = $find("<%= txtProductionNotes.ClientID %>").get_html(); |
| var oWnd = window.radopen(GetRoot() + "/DesktopModules/JCSMisc/ViewNotes.aspx?Text=" + text, ""); |
| oWnd.Argument = "ViewNotes:" + commandName; |
| oWnd.Maximize(); |
| } |
| function OnClientClose(radWindow) |
| { |
| __doPostBack("<%= this.UniqueID %>", radWindow.Argument); |
| } |
| RadEditor objText = (RadEditor)this.FindControl(strControl); |
| if (objText.Enabled == true) |
| objText.Content = strText; |
If one uses the default option for all of the control's skins is it possible to quickly change the look of the default setting for all of the controls in a website? Viewing the forums I've seen the suggestion of changing the following line of the WebConfing file.
| <appSettings> |
| <add key="Telerik.WebControls.Skin" value="WebBlue" /> |
| </appSettings> |
<asp:ScriptManager runat="server" ID="ScriptManager1" />
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
<telerik:RadTreeView runat="server" ID="PHTreeView" CheckBoxes="true"
OnClientContextMenuItemClicked="RadTree_ContextMenuItemClick">
</telerik:RadTreeView>
<telerik:RadToolTipManager Width="215px" Skin="Sunset" Height="260px" HideDelay="1"
RelativeTo="Element" ID="PHToolTipMgr" runat="server" OffsetX="15" Position="MiddleRight"
OnAjaxUpdate="PHToolTipMgr_AjaxUpdate">
</telerik:RadToolTipManager>
</telerik:RadAjaxPanel>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script language="javascript">
function RadTree_ContextMenuItemClick(sender, eventArgs)
{
var nodeElem= eventArgs.get_node();
if(nodeElem.get_level() != 0)
{
var node = nodeElem.get_textElement();
var tooltipManager = $find("<%= PHToolTipMgr.ClientID %>");
if (!tooltipManager) return;
var tooltip = tooltipManager.getToolTipByElement(node);
if (!tooltip)
{
tooltip = tooltipManager.createToolTip(node);
tooltip.set_value(nodeElem.get_value());
tooltip.show();
}
}
}
</script>
</telerik:RadCodeBlock>
For the VB file, I am building the Tree from an XML String. Also, I am not setting the TargetControls property of the Tooltip Manager Control. Although, I have tried it and makes no difference. When choosing a context menu the PageLoad does fire but the following does not fire. I was hoping to load a usercontrol in the AjaxUpdate method.
Public Sub PHToolTipMgr_AjaxUpdate(ByVal sender As Object, ByVal e As Telerik.Web.UI.ToolTipUpdateEventArgs) Handles PHToolTipMgr.AjaxUpdate
Thanks for you help.
| public static void HideRadGridEditButtonsForReaders(GridItemEventArgs e) |
| { |
| if (e.Item is GridDataItem) |
| { |
| GridDataItem item = (GridDataItem)e.Item; |
| ImageButton editButton = null; |
| ImageButton deleteButton = null; |
| if(item["EditCommandColumn"] != null) |
| editButton = (ImageButton)item["EditCommandColumn"].Controls[0]; |
| if (item["DeleteColumn"] != null) |
| deleteButton = (ImageButton)item["DeleteColumn"].Controls[0]; |
| if (HttpContext.Current.User.IsInRole(Utilities.RoleTypes.AdministratorReaders.ToString())) |
| { |
| if(editButton != null) editButton.Visible = false; |
| if (deleteButton != null) deleteButton.Visible = false; |
| } |
| } |
| } |
| <SortingSettings SortedBackColor="#d0d0d0" /> |

<
asp:Content ID="Content1" ContentPlaceHolderID="ImageLibraryContent" Runat="Server">
<
div id='abc' class="codebox">
<asp:table ID="Table1" runat="server" Width="98%">
<
asp:tablerow>
<
asp:TableCell Width = "500px" VerticalAlign="Top" >
<rad:RadGrid ID="grdImages" runat="server" Skin="Outlook2007" Width="430px" height="324px" GridLines="None" AllowPaging="False" EnableAJAX="False">
<ClientSettings EnablePostBackOnRowClick = "true" Scrolling-AllowScroll = "true" Scrolling-UseStaticHeaders="true" >
</ClientSettings>
<MasterTableView autogeneratecolumns="False" DataKeyNames = "ImageId,PartCode,DoubleSided" >
<Columns>
<rad:GridBoundColumn DataField="PartCode" HeaderText="Part #" UniqueName="PartCode" >
<ItemStyle HorizontalAlign="Left" Width = "90px"></ItemStyle>
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="PartDescription" HeaderText="Description" >
<ItemStyle HorizontalAlign="Left" Width = "340px"></ItemStyle>
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="ImageID" UniqueName="ImageID" Visible ="false" >
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="DoubleSided" UniqueName="DoubleSided" Visible ="false" >
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="FrontSideExtension" UniqueName="FrontSideExtension" Visible ="false" >
</rad:GridBoundColumn>
<rad:GridBoundColumn DataField="BackSideExtension" UniqueName="BackSideExtension" Visible ="false" >
</rad:GridBoundColumn>
</Columns>
</MasterTableView>
</rad:RadGrid>
<br />
<asp:Table ID="Table3" runat="server" align="Left" >
<asp:TableRow >
<asp:TableCell Width="10%">
</asp:TableCell>
<asp:TableCell >
<asp:Label ID="lblSearchPartNumber" runat="server" Text="Part #:" Width="45px" TabIndex="9"></asp:Label>
</asp:TableCell>
<asp:TableCell >
<asp:TextBox ID="txtSearchPartNumber" runat="server" TabIndex="1"></asp:TextBox>
</asp:TableCell>
<asp:TableCell >
<asp:Button ID="btnSearchPartNum" runat="server" Text="Search" Width="153px" TabIndex="2" />
</asp:TableCell>
</asp:TableRow>
<asp:TableRow >
<asp:TableCell Width="10%">
</asp:TableCell>
<asp:TableCell >
<asp:Label ID="lblSearchDescription" runat="server" Text="Description:" Width="75px" TabIndex="10"></asp:Label>
</asp:TableCell>
<asp:TableCell >
<asp:TextBox ID="txtSearchDescription" runat="server" TabIndex="3"></asp:TextBox>
</asp:TableCell>
<asp:TableCell >
<asp:Button ID="btnSearchDescription" runat="server" Text="Search" Width="153px" TabIndex="4" />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</asp:TableCell>
<asp:TableCell >
<asp:Table ID="Table2" runat="server" Width= "60%" Border="1">
<asp:TableHeaderRow ><asp:TableHeaderCell runat="server" ID="HeaderCell" nbsp</asp:TableHeaderCell></asp:TableHeaderRow>
<asp:TableRow >
<asp:TableCell HorizontalAlign="Left" >
<asp:Image ID="ImageFront" width="300px" height="190px" BorderWidth = "1" runat="server" AlternateText = "No Image" GenerateEmptyAlternateText ="true" Style="z-index: 100;" onclick="ShowImage(this.src);" />
</asp:TableCell>
</asp:TableRow>
<asp:TableRow ><asp:TableCell HorizontalAlign="Left"><b>Front Image</b></asp:TableCell></asp:TableRow>
<asp:TableRow >
<asp:TableCell HorizontalAlign="Left" >
<asp:Image ID="ImageBack" width="300px" height="190px" BorderWidth = "1" runat="server" Style="z-index: 100;" onclick="ShowImage(this.src)" AlternateText="No Image" GenerateEmptyAlternateText="True" />
</asp:TableCell>
</asp:TableRow>
<asp:TableRow ><asp:TableCell HorizontalAlign="Left"><b>Back Image</b></asp:TableCell></asp:TableRow>
</asp:Table>
</asp:TableCell>
</asp:tablerow>
<asp:TableRow>
<asp:TableCell>
</asp:TableCell>
<asp:TableCell>
</asp:TableCell>
<asp:TableCell>
<asp:Button ID="btnDisassociate" runat="server" Style="z-index: 109;" Text="Delete" Height="30px" Width="65px" TabIndex="5" Enabled = "false" OnClientClick="return delAlert()" />
</asp:TableCell>
</asp:TableRow>
</asp:table>
<radW:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Outlook">
<Windows>
<radW:RadWindow
ID="RadWindow1"
runat="server"
Height="300px"
Left="200px"
Skin="Outlook"
SkinsPath="~/RadControls/Window/Skins"
Title="Search for Customer"
Top="100px"
Width="600px" VisibleStatusbar="False" />
</Windows>
</radW:RadWindowManager>
<script type="text/javascript">
function ShowImage(id)
{
var cpdRepWindow;
id = escape(id)
id = id.replace(
"+", "%2B");
id = id.replace(
"/", "%2F");
cpdRepWindow =
"PartImageWindow.aspx?ImageID=" + id;
window.radopen(cpdRepWindow,
"RadWindow1");
}
</script>
<script language="JavaScript" type="text/javascript">
<!-- Hide;
function delAlert()
{
return confirm("Are you sure you want to remove this item?")
}
// -->
</script>
</div>
</
asp:Content>