As part on the functionality I am trying to include in my web application, is the ability to “search” the TreeList. I have a field selector drop down list and a text box or check box to enter the search criteria. The search button performs a post back where I then location a match in the data source. Now that I have the matching record, how can I force it to be displayed selected? The result of the search may be a child node somewhere down the hierarchy not currently being displayed. If this is the case I would want the branch with the matching criteria to be expanded to this item. Then I would want to select the item. Does anyone have any ideas on how to force a node to be displayed?
I have not looked into using ExpandItemToLevel since it is liable to expose too many items. I don’t think it would work for one level at a time since I might be calling it for items not displayed, recursive calls.
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadAjaxManagerProxy1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManagerProxy><telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server" Skin="Default"> </telerik:RadAjaxLoadingPanel><telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script language="javascript"> function Initiate_<%= ClientID %>(){ var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>"); ajaxManager.ajaxRequest(); return false; } </script> </telerik:RadCodeBlock>Dim manager As RadAjaxManager = RadAjaxManager.GetCurrent(Page) AddHandler manager.AjaxRequest, AddressOf manager_AjaxRequest cmbLookUp.OnClientSelectedIndexChanged = "Initiate_" + Me.ClientID protected void rgMyGrid_PreRender(object sender, EventArgs e) { try { foreach (GridDataItem item in rgMyGrid.MasterTableView.Items) { if (item is GridDataItem) { foreach (GridColumn col in rgMyGrid.Columns) { //Add space to the cell that has null or empty value if (!col.ColumnType.Equals("GridTemplateColumn")) { if (string.IsNullOrEmpty(item[col.UniqueName].Text.Trim()) || item[col.UniqueName].Text.Equals(" ")) { item[col.UniqueName].Text = " "; } } else { #region AllowSpaceInCols switch (col.UniqueName) { case "lblColumn1": Label lblColumn1= item.FindControl("lblColumn1") as Label; if (lblColumn1.Text.Trim().Equals(String.Empty) || lblColumn1.Text.Trim().Equals(" ")) { lblColumn1.Text = " "; } break; case "Column2": Label lblColumn2 = item.FindControl("lblColumn2") as Label; if (lblColumn2 .Text.Trim().Equals(String.Empty) || lblColumn2 .Text.Trim().Equals(" ")) { lblColumn2 .Text = " "; } break; default: break; } #endregion } } } } } catch (Exception ex) { } }<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Message.ascx.cs" Inherits="Elearning.Usecases.UserControl.Message" %><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script><script type="text/javascript"> $(document).ready(function () { setTimeout(function () { $("#<%=MessageContainer.ClientID %>").fadeOut("slow", function () { $("#<%=MessageContainer.ClientID %>").remove(); }); }, 2000); $('.closeImage').click(function () { $(this).parent().hide(); }); });</script><div Class="Message"><asp:Panel ID="MessageContainer" runat="server"> <asp:Image ID="CloseImage" CssClass="closeImage icon" Style="float: right;" runat="server" ImageUrl='<%# HermesControl.GetAppItemRelativeUrl(Elearning.ElearningCommon.Icons.Delete ) %>' /> <asp:Label ID="lblMessage" EnableViewState="false" runat="server" /></asp:Panel></div>
Main page
<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
<telerik:AjaxSetting AjaxControlID="imgbtnShowMessagetnSave">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="message1" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="message1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="message1" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
<include:message ID="message1" runat="server" />
<asp:Button runat="server" ID="btnShowMessage"/>
And if a call show messages, then message show but don´t hide after two second.
Please you know why?
Thanks and sorry for my english
<telerik:RadGrid ID="gvViolation" EnableViewState="false" runat="server" AllowPaging="true" AllowSorting="True" AllowFilteringByColumn="false" GridLines="None" Skin="Sunset" Width="735px" PageSize="3"> <ExportSettings OpenInNewWindow="true" > <Pdf Author="WheelTrack" Creator="WheelTrack" /> </ExportSettings> <MasterTableView AllowMultiColumnSorting="true" TableLayout="Fixed" > <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn> <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn> <PagerStyle Mode="NextPrevAndNumeric" /> <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" ShowExportToPdfButton="true" ShowAddNewRecordButton="false" ShowExportToCsvButton="true" /> <Columns> <telerik:GridBoundColumn DataField="Device_Name" HeaderText="Device Name" /> <telerik:GridBoundColumn DataField="Device_Desc" HeaderText="Device Desc" /> <telerik:GridBoundColumn DataField="Rule_Name" HeaderText="Rule Name" /> <telerik:GridBoundColumn DataField="ViolationText" HeaderText="Violation" /> <telerik:GridBoundColumn DataField="Latitude" HeaderText="Latitude" /> <telerik:GridBoundColumn DataField="Longtitude" HeaderText="Longtitude" /> <telerik:GridBoundColumn DataField="UTC_Date" HeaderText="Violation Date" /> <telerik:GridBoundColumn DataField="UTC_Time" HeaderText="Violation Time" /> <telerik:GridBoundColumn DataField="Location_NearBy" HeaderText="Location NearBy" /> </Columns> </MasterTableView> <FilterMenu EnableImageSprites="False"></FilterMenu> <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Sunset"></HeaderContextMenu> <PagerStyle AlwaysVisible="true" Mode="NumericPages"/> <ClientSettings> <ClientEvents OnCommand="gvViolation_Command" /> </ClientSettings></telerik:RadGrid>function Load(sender, args) { sumInput = sender; sender.get_styles().EnabledStyle[0] += "color:Red;"; sender.updateCssClass(); }<telerik:RadGrid ID="grdPlans" runat="server" AutoGenerateColumns="false"> <MasterTableView EditMode="InPlace" ShowFooter="True" TableLayout="Fixed" DataKeyNames="ProjectId"> <Columns> <telerik:GridBoundColumn DataField="ProjectId" HeaderText="Project Id"> <HeaderStyle Width="10%" /> </telerik:GridBoundColumn> <telerik:GridTemplateColumn HeaderText="Jan" DataField="Jan" UniqueName="Jan"> <ItemTemplate> <telerik:RadNumericTextBox ID="txbMonth1" runat="server" Text='<%#Bind("Jan") %>' Width="50px" IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true" NumberFormat-DecimalDigits="1" MinValue="0" MaxValue="150"> <ClientEvents OnBlur="Blur1" OnFocus="Focus1" /> </telerik:RadNumericTextBox> </ItemTemplate> <FooterTemplate> <telerik:RadNumericTextBox ID="txbTotal1" runat="server" ReadOnly="true" NumberFormat-DecimalDigits="1" Width="50px"> <ClientEvents OnLoad="Load" /> </telerik:RadNumericTextBox> </FooterTemplate> </telerik:GridTemplateColumn>