<FONT color="#0000ff" size="2" face="Consolas"><FONT color="#0000ff" size="2"face="Consolas"><FONT color="#0000ff" size="2"face="Consolas"><telerik:RadPanelItem Text="Content Details" Expanded="True"PostBack="false"Selected="true"><BR> <Items><BR> <telerik:RadPanelItem Text="Description" Value="DESCRIPTION"></telerik:RadPanelItem><BR> <telerik:RadPanelItem Text="Objectives/Requirements"Value="Requirements"></telerik:RadPanelItem><BR> <telerik:RadPanelItem Text="Scenario Details"Value="ScenarioDetails"></telerik:RadPanelItem> <BR> <telerik:RadPanelItem Text="Categorization"Value="TrainingDiscipline"></telerik:RadPanelItem><BR> <telerik:RadPanelItem Text="Simulator Details"Value="SimulatorDetails"></telerik:RadPanelItem> <BR> <BR> </Items><BR> </telerik:RadPanelItem><BR></FONT></FONT></FONT>Now I want to maintain the Selected Item even if click the Root Item(Here : "DESCRIPTION").
if click any item under "DESCRIPTION" then the selected item is highlighted
and Now if click the root item i.e."DESCRIPTION" then the "DESCRIPTION" is Highlighted, but i want to hhighlight the child Item i.e "Categorization", because i'm still on the same page.
I attached the screen shots also. I want to maintain the Highlighted selected Item based on the current page.
Thanks in Advance
karthik
private void AddStyleSheets(RadStyleSheetManager styleSheetManager) { styleSheetManager.StyleSheets.Clear(); if (SessionManager.CurrentSessionManager.PageTheme.ToLower().Equals("tone")) { styleSheetManager.StyleSheets.Add(new Telerik.Web.UI.StyleSheetReference("SNet.RTO.Skins.TOne.ComboBox.css", "SNet.RTO.Skins.TOne")); } else { styleSheetManager.StyleSheets.Add(new Telerik.Web.UI.StyleSheetReference("CustomSkins.ComboBox.css", "CustomSkins")); } styleSheetManager.ApplyStyleSheetSkin(Page); }<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <plk:Formulario ID="frmDistribuidor" runat="server" Titulo="Distribuidores" Visible="false"> <asp:Panel ID="pnlDistribuidorUnico" runat="server" Visible="false"> <div> <asp:Label ID="label4" runat="server" Text="Distribuidor"></asp:Label> <span style="padding-left: 73px;"> <asp:DropDownList ID="ddlDistribuidor" Width="280px" runat="server"> </asp:DropDownList> </span> </div> </asp:Panel> <asp:Panel ID="pnlDistribuidorLooping" runat="server" Visible="false"> <div style="float: left; padding-left: 20px;"> <div class="esq larg300"> <div style="background-color: #3C49A5; width: 300px; height: 20px;"> <div style="padding-top: 4px; text-align: center; color: White; height: 20px;"> Distribuidores de Preferência </div> </div> <telerik:RadListBox ID="RadListBox1" runat="server" Width="300px" Height="150px" SelectionMode="Multiple" AllowTransfer="True" TransferToID="RadListBox2" AllowReorder="True" EnableDragAndDrop="True" PersistClientChanges="true" OnClientTransferred="onClientTransferredHandler" AutoPostBackOnReorder="true" CssClass="RadListBox"> <ButtonSettings ShowTransferAll="false" ShowTransfer="false" VerticalAlign="Middle" ShowReorder="false" AreaWidth="50px" /> </telerik:RadListBox> </div> <div class="esq alt150" style="text-align: center; padding-left: 10px"> <br /> <br /> <br /> <asp:ImageButton ID="btnParaDireita" ImageUrl="~/Imagens/btn-Rigth.png" runat="server" ToolTip="Adicionar" OnClientClick="return transferRight()" /> <br /> <asp:ImageButton ID="btnParaEsquerda" ImageUrl="~/Imagens/btn-Left.png" runat="server" ToolTip="Remover" OnClientClick="return transferLeft()" /> <br /> <br /> <img id="btnAjudaListBox" runat="server" alt="Ajuda" src="../../Imagens/btn-ajudar.png" /> <telerik:RadToolTip ID="RadToolTip1" runat="server" AnimationDuration="0" AutoCloseDelay="0" Position="MiddleRight" RelativeTo="Element" ShowCallout="False" ShowDelay="0" ShowEvent="OnClick" Skin="Hay" TargetControlID="btnAjudaListBox" Text="Para inclusão de um distribuidor no processo de looping, selecione-o na <br /> lista de Distribuidores de Preferência e arraste para a lista de Distribuidores <br /> Selecionados, ou pressione o botão adicionar."> </telerik:RadToolTip> </div> <div class="esq larg300" style="padding-left: 10px"> <div style="background-color: #3C49A5; width: 300px; height: 20px;"> <div style="padding-top: 4px; text-align: center; color: White; height: 20px;"> Distribuidores Selecionados </div> </div> <telerik:RadListBox ID="RadListBox2" runat="server" Width="300px" Height="150px" SelectionMode="Multiple" AllowReorder="true" EnableDragAndDrop="true" PersistClientChanges="true" AutoPostBackOnReorder="true" CssClass="RadListBox"> <ButtonSettings ShowTransferAll="false" ShowReorder="false" VerticalAlign="Middle" AreaWidth="50px" /> </telerik:RadListBox> </div> <div class="esq alt150" style="text-align: center; padding-left: 10px;"> <div class="marginTop47"> <asp:ImageButton ID="btnParaCima" ImageUrl="~/Imagens/btn-Up.png" runat="server" OnClientClick="return reorderUp()" ToolTip="Mover para Cima" /> </div> <div> <asp:ImageButton ID="btnParaBaixo" ImageUrl="~/Imagens/btn-Down.png" runat="server" OnClientClick="return reorderDown()" ToolTip="Mover para Baixo" /> </div> </div> </div> </asp:Panel> <div style="clear: both;"> </div> <asp:Panel ID="pnlDistribuidorVisualizacao" runat="server" Visible="false"> <div class="esq larg300" style="padding-left: 200px"> <div style="background-color: #3C49A5; width: 300px; height: 20px;"> <div style="padding-top: 4px; text-align: center; color: White; height: 20px;"> Distribuidores Selecionados </div> </div> <telerik:RadListBox ID="RadListBoxVisualizacao" runat="server" Width="300px" SelectionMode="Single" AllowReorder="false" AutoPostBackOnReorder="true" EnableDragAndDrop="false" CssClass="RadListBox"> <ButtonSettings ShowTransferAll="false" ShowReorder="false" ShowDelete="false" ShowTransfer="false" VerticalAlign="Middle" AreaWidth="50px" /> </telerik:RadListBox> </div> </asp:Panel> <div style="clear: both;"> </div> <br /> <div> <div align="center"> <asp:Label ID="label3" runat="server" Text="Forma de Pagamento" Font-Underline="true" Font-Bold="true"></asp:Label> </div> <div align="center" class="alinhaDivPrazoPagamento"> <asp:RadioButtonList ID="rblPrazo" runat="server" CssClass="Formulario" Height="12px" RepeatDirection="Horizontal" Width="184px" BorderStyle="None" CausesValidation="True" Visible="true"> <asp:ListItem Value="1">À vista</asp:ListItem> <asp:ListItem Value="2">A prazo</asp:ListItem> </asp:RadioButtonList> </div> </div> </plk:Formulario> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="btnVisualizar" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="btnCorrigir" EventName="Click" /> </Triggers> </asp:UpdatePanel>function transferRight() { var listBox = $find("<%= RadListBox1.ClientID %>"); var selectedItem = listBox.get_selectedItems(); if (selectedItem == null) { alert("É necessário selecionar um item primeiro."); return false; } listBox.transferToDestination(selectedItem); } function transferLeft() { var listBox = $find("<%= RadListBox1.ClientID %>"); var listBox2 = listBox.get_transferTo(); var selectedItem = listBox2.get_selectedItems(); if (selectedItem == null) { alert("É necessário selecionar um item primeiro."); return false; } listBox.transferFromDestination(selectedItem); }Hello everybody,
I am using a radwindow that will be opened from my radGrid through some JavaScript code,
<script type="text/javascript">
function ShowEditForm(id, rowIndex) {
var grid = $find("<%= RadGrid1.ClientID %>");
var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
grid.get_masterTableView().selectItem(rowControl, true);
window.radopen("EditFormCS.aspx?PanelId=" + id, "UserListDialog");
return false;
}
function ShowInsertForm() {
window.radopen("EditFormCS.aspx", "UserListDialog");
return false;
}
function refreshGrid(arg) {
if (!arg) {
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
}
else {
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");
}
}
function RowDblClick(sender, eventArgs) {
window.radopen("EditFormCS.aspx?PanelId=" + eventArgs.getDataKeyValue("PanelId"), "UserListDialog");
}
</script>
After a while it enconcuter an error when I am trying to open the radwindow, and it seems that it never free the resources(memory) after I close
the radwindow.I have read so many posts and none of them come to solve the problem.
For instance I used Garbage collector to free the resource but it dosnt work.I restart
The Server(Immagin how terrible is it when so many Users are connected )and it is ok until it take whole the memory again.
The structur is :
Myfolder :
myPage(RaddGrid is in this page and radwindow will be opened through a link insid the Grid)
EditForm(content of radwinow)
And in EditForm after user Submit it will close the radwindow
<script type="text/javascript">
function CloseAndRebind(args) {
GetRadWindow().BrowserWindow.refreshGrid(args);
GetRadWindow().close();
}
function GetRadWindow() {
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)
return oWindow;
}
function CancelEdit() {
GetRadWindow().close();
}
function onError(input, args) {
var message = "Invalid character: ";
message += "accepts only numberic values.";
document.getElementById("numInput").innerHTML = args.get_inputText();
document.getElementById("numErrorOut").innerHTML = message;
}
function onKeyPress(input, args) {
document.getElementById("numInput").innerHTML = "";
document.getElementById("numErrorOut").innerHTML = "";
}
function Close() {
GetRadWindow().Close();
}
</script>
And my GC is in the submit event :
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GridColumnSelector.ascx.cs" Inherits="GCSTestApplication.Controls.GridColumnSelector" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><script type="text/javascript"> function showWin() { var rwManager = $find("<%= rWindow.ClientID %>"); rwManager.show(); return false; }</script><telerik:RadButton ID="btnShowMenu" OnClientClicked="showWin" AutoPostBack="false" runat="server" Text="Show "></telerik:RadButton><telerik:RadWindowManager Behaviors="Close" ID="rwm" runat="server"><Windows><telerik:RadWindow ID="rWindow" ClientIDMode="Static" Title="Save layout" runat="server" Modal="true" Height="200" Width="400"> <ContentTemplate> <asp:Label ID="Label1" runat="server" Text="Show some text" /> </ContentTemplate></telerik:RadWindow></Windows></telerik:RadWindowManager>