<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default_test.aspx.vb" Inherits="_Default_test" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Ofertas Rittal</title> <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" /></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Scripts> <%--Needed for JavaScript IntelliSense in VS2010--%> <%--For VS2008 replace RadScriptManager with ScriptManager--%> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" /> </Scripts> </telerik:RadScriptManager> <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> //Put your JavaScript code here. </script> </telerik:RadCodeBlock> <label style="font-family: Calibri; font-size: small; font-weight: 700; height: 32px;">Skin:</label> <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" ShowChooser="True" Skin="Windows7"> </telerik:RadSkinManager> <telerik:RadButton ID="RadButton1" runat="server" Text="Guardar preferencias"> </telerik:RadButton> <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="all"></telerik:RadFormDecorator> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadWindowManager ID="RadWindowManager1" runat="server"> </telerik:RadWindowManager> <div> <br /> <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" Height="26px" Width="500px" SelectedIndex="1"> <Tabs> <telerik:RadTab runat="server" PageViewID="RadPageView1" Text="Cabecera"> </telerik:RadTab> </Tabs> </telerik:RadTabStrip> <telerik:RadMultiPage ID="RadMultiPage1" Runat="server" Height="64px" Width="500px" SelectedIndex="0" Font-Names="Calibri" Font-Size="Small"> <telerik:RadPageView ID="RadPageView1" runat="server" BorderStyle="Outset"> <div class="inputs"> <br /> <telerik:RadTextBox ID="RadTextBox5" Runat="server" ReadOnly="True" Text="Cliente:" Width="75px" Font-Bold="True" Font-Names="Calibri" Font-Size="Small" BorderWidth="0px" BackColor="Transparent" BorderColor="Transparent" TabIndex="-1"> </telerik:RadTextBox> <telerik:RadMaskedTextBox ID="TB_Cod_cliente" Runat="server" Mask="########" Width="60px" AutoPostBack="True"> </telerik:RadMaskedTextBox> <telerik:RadTextBox ID="TB_Company" Runat="server" Width="300px"> </telerik:RadTextBox> <br /> <br /> <telerik:RadTextBox ID="RadTextBox6" Runat="server" ReadOnly="True" style="font-family: Calibri; font-weight: 700" Text="Dirección:" Width="75px" Font-Bold="True" Font-Names="Calibri" Font-Size="Small" BorderWidth="0px" BackColor="Transparent" TabIndex="-1"> </telerik:RadTextBox> <telerik:RadTextBox ID="TB_Address1" Runat="server" Width="365px"> </telerik:RadTextBox> <br /> <telerik:RadTextBox ID="RadTextBox7" Runat="server" ReadOnly="True" style="font-family: Calibri; font-weight: 700" Text="" Width="75px" Font-Bold="True" Font-Names="Calibri" Font-Size="Small" BorderWidth="0px" BackColor="Transparent" TabIndex="-1"> </telerik:RadTextBox> <telerik:RadTextBox ID="TB_Address2" Runat="server" Width="365px"> </telerik:RadTextBox> <br /> <br /> <telerik:RadTextBox ID="RadTextBox8" Runat="server" ReadOnly="True" style="font-family: Calibri; font-weight: 700" Text="Cód. postal:" Width="75px" Font-Bold="True" Font-Names="Calibri" Font-Size="Small" BorderWidth="0px" BackColor="Transparent" TabIndex="-1"> </telerik:RadTextBox> <telerik:RadMaskedTextBox ID="TB_Zip" Runat="server" Mask="#####" Width="35px"> </telerik:RadMaskedTextBox> <telerik:RadTextBox ID="RadTextBox4" Runat="server" ReadOnly="True" style="font-family: Calibri; font-weight: 700" Text="Población:" Width="65px" Font-Bold="True" Font-Names="Calibri" Font-Size="Small" BorderWidth="0px" BackColor="Transparent" TabIndex="-1"> </telerik:RadTextBox> <telerik:RadTextBox ID="TB_City" Runat="server" Width="240px"> </telerik:RadTextBox> <br /> <br /> <telerik:RadTextBox ID="RadTextBox10" Runat="server" ReadOnly="True" style="font-family: Calibri; font-weight: 700" Text="Provincia:" Width="75px" Font-Bold="True" Font-Names="Calibri" Font-Size="Small" BorderWidth="0px" BackColor="Transparent" TabIndex="-1"> </telerik:RadTextBox> <telerik:RadComboBox ID="DD_State" runat="server" DataSourceID="Provincias" DataTextField="descripcion" DataValueField="descripcion"> </telerik:RadComboBox> <telerik:RadTextBox ID="RadTextBox17" Runat="server" ReadOnly="True" style="font-family: Calibri; font-weight: 700" Text="Contacto:" Width="70px" Font-Bold="True" Font-Names="Calibri" Font-Size="Small" BorderWidth="0px" BackColor="Transparent" TabIndex="-1"> </telerik:RadTextBox> <telerik:RadComboBox ID="DD_Contacto" runat="server" AutoPostBack="True"> </telerik:RadComboBox> <br /> <br /> <hr width="490px" /> <br /> </div> </telerik:RadPageView> </telerik:RadMultiPage> <asp:SqlDataSource ID="Provincias" runat="server" ConnectionString="<%$ ConnectionStrings:OfflineEDConnectionString %>" SelectCommand="SELECT UPPER([descripcion]) AS descripcion FROM [Provincias_Lov_Informes] ORDER BY [descripcion]"> </asp:SqlDataSource> </div> </form></body></html>Imports Telerik.Web.UIImports System.Data.SqlClientImports System.DataPartial Class _Default_test Inherits System.Web.UI.Page Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then retreive_preferences() End If End Sub Protected Sub TB_Cod_cliente_TextChanged(sender As Object, e As System.EventArgs) Handles TB_Cod_cliente.TextChanged load_company_data(TB_Cod_cliente.Text) End Sub Protected Sub load_company_data(ByVal cod_cli As String) If cod_cli.Length > 0 Then RadTabStrip1.SelectedIndex = 0 RadMultiPage1.SelectedIndex = 0 Dim conn As New SqlConnection() conn.ConnectionString = ConfigurationManager.ConnectionStrings("OfflineEDConnectionString").ConnectionString Dim cmd As New SqlCommand cmd.CommandType = CommandType.Text cmd.CommandText = "SELECT company_name,address_1,address_2,zip,city,State_ from company where cod_cliente=@cod_cliente" cmd.Connection = conn ' Create a SqlParameter for each parameter in the stored procedure. Dim codclienteParam As New SqlParameter("@cod_cliente", cod_cli) cmd.Parameters.Add(codclienteParam) Dim found As Boolean = False Dim reader As SqlDataReader Dim previousConnectionState As ConnectionState = conn.State Try If conn.State = ConnectionState.Closed Then conn.Open() End If reader = cmd.ExecuteReader() Using reader While reader.Read ' Process SprocResults datareader here. TB_Company.Text = reader.GetValue(0).ToString TB_Address1.Text = reader.GetValue(1).ToString TB_Address2.Text = reader.GetValue(2).ToString TB_Zip.Text = reader.GetValue(3).ToString TB_City.Text = reader.GetValue(4).ToString DD_State.SelectedValue = reader.GetValue(5).ToString found = True End While End Using Finally If previousConnectionState = ConnectionState.Closed Then conn.Close() End If End Try If found = False Then DD_Contacto.DataSource = CreateDataSource(cod_cli) DD_Contacto.DataTextField = "nombre_completo" DD_Contacto.DataValueField = "contact_id_text" DD_Contacto.DataBind() End If End If End Sub Function CreateDataSource(ByVal cod_cliente As String) As ICollection Dim dt As New DataTable Dim dr As DataRow dt.Columns.Add(New DataColumn("contact_id_text", GetType(String))) dt.Columns.Add(New DataColumn("nombre_completo", GetType(String))) dr = dt.NewRow() dr(0) = "-1" dr(1) = "" dt.Rows.Add(dr) dr = dt.NewRow() dr(0) = "0" dr(1) = "_Nuevo registro_" dt.Rows.Add(dr) Dim conn As New SqlConnection() conn.ConnectionString = ConfigurationManager.ConnectionStrings("OfflineEDConnectionString").ConnectionString Dim cmd As New SqlCommand cmd.CommandType = CommandType.Text cmd.CommandText = "SELECT contact_id_text,full_name from contact where cod_cliente=@cod_cliente" cmd.Connection = conn ' Create a SqlParameter for each parameter in the stored procedure. Dim codclienteParam As New SqlParameter("@cod_cliente", cod_cliente) cmd.Parameters.Add(codclienteParam) Dim found As Boolean = False Dim reader As SqlDataReader Dim previousConnectionState As ConnectionState = conn.State Try If conn.State = ConnectionState.Closed Then conn.Open() End If reader = cmd.ExecuteReader() Using reader While reader.Read ' Process SprocResults datareader here. dr = dt.NewRow() dr(0) = reader.GetValue(0).ToString dr(1) = reader.GetValue(1).ToString Try dt.Rows.Add(dr) Catch ex As Exception End Try End While End Using Finally If previousConnectionState = ConnectionState.Closed Then conn.Close() End If End Try Dim dv As New DataView(dt) dv.Sort = "nombre_completo" Return dv End Function Protected Sub RadButton1_Click(sender As Object, e As System.EventArgs) Handles RadButton1.Click Dim usuario As String = Context.Request.ServerVariables("AUTH_USER") If usuario.Split("\").Count > 1 Then usuario = usuario.Split("\")(1) End If If usuario.Length > 0 Then Dim conn As New SqlConnection() conn.ConnectionString = ConfigurationManager.ConnectionStrings("OfertasConnectionString").ConnectionString Dim cmd As New SqlCommand cmd.CommandType = CommandType.Text cmd.CommandText = "SELECT count(*) from Preferencias where usuario=@usuario" cmd.Connection = conn ' Create a SqlParameter for each parameter in the stored procedure. Dim userParam As New SqlParameter("@usuario", usuario) cmd.Parameters.Add(userParam) Dim found As Integer = 0 Dim reader As SqlDataReader Dim previousConnectionState As ConnectionState = conn.State Try If conn.State = ConnectionState.Closed Then conn.Open() End If reader = cmd.ExecuteReader() Using reader While reader.Read ' Process SprocResults datareader here. found = reader.GetValue(0).ToString End While End Using Finally If previousConnectionState = ConnectionState.Closed Then conn.Close() End If End Try If found = 0 Then insert_preferences(usuario, "skin", RadSkinManager1.Skin) Else update_preferences(usuario, "skin", RadSkinManager1.Skin) End If End If End Sub Protected Sub update_preferences(ByVal username As String, ByVal field As String, ByVal value As String) Dim conn As New SqlConnection() conn.ConnectionString = ConfigurationManager.ConnectionStrings("OfertasConnectionString").ConnectionString Dim cmd As New SqlCommand cmd.CommandType = CommandType.Text cmd.CommandText = "update preferencias set " + field + "=@value where usuario=@usuario" cmd.Connection = conn ' Create a SqlParameter for each parameter in the stored procedure. Dim valueParam As New SqlParameter("@value", value) cmd.Parameters.Add(valueParam) Dim userParam As New SqlParameter("@usuario", username) cmd.Parameters.Add(userParam) Dim rowCount As Integer Dim previousConnectionState As ConnectionState previousConnectionState = conn.State Try If conn.State = ConnectionState.Closed Then conn.Open() End If rowCount = cmd.ExecuteNonQuery() Finally If previousConnectionState = ConnectionState.Closed Then conn.Close() End If End Try If rowCount = 0 Then RadWindowManager1.RadAlert("Error al guardar las preferencias", 330, 100, "Error!", "alertCallBackFn") Else RadWindowManager1.RadAlert("Preferencias guardadas correctamente", 330, 100, "Ok", "alertCallBackFn") End If End Sub Protected Sub insert_preferences(ByVal username As String, ByVal field As String, ByVal value As String) Dim conn As New SqlConnection() conn.ConnectionString = ConfigurationManager.ConnectionStrings("OfertasConnectionString").ConnectionString Dim cmd As New SqlCommand cmd.CommandType = CommandType.Text cmd.CommandText = "insert into preferencias (usuario," + field + ") values (@usuario,@value)" cmd.Connection = conn ' Create a SqlParameter for each parameter in the stored procedure. Dim valueParam As New SqlParameter("@value", value) cmd.Parameters.Add(valueParam) Dim userParam As New SqlParameter("@usuario", username) cmd.Parameters.Add(userParam) Dim rowCount As Integer Dim previousConnectionState As ConnectionState previousConnectionState = conn.State Try If conn.State = ConnectionState.Closed Then conn.Open() End If rowCount = cmd.ExecuteNonQuery() Finally If previousConnectionState = ConnectionState.Closed Then conn.Close() End If End Try If rowCount = 0 Then RadWindowManager1.RadAlert("Error al guardar las preferencias", 330, 100, "Error!", "alertCallBackFn") Else RadWindowManager1.RadAlert("Preferencias guardadas correctamente", 330, 100, "Ok", "alertCallBackFn") End If End Sub Protected Sub retreive_preferences() Dim usuario As String = Context.Request.ServerVariables("AUTH_USER") If usuario.Split("\").Count > 1 Then usuario = usuario.Split("\")(1) End If If usuario.Length > 0 Then Dim conn As New SqlConnection() conn.ConnectionString = ConfigurationManager.ConnectionStrings("OfertasConnectionString").ConnectionString Dim cmd As New SqlCommand cmd.CommandType = CommandType.Text cmd.CommandText = "SELECT skin from Preferencias where usuario=@usuario" cmd.Connection = conn ' Create a SqlParameter for each parameter in the stored procedure. Dim userParam As New SqlParameter("@usuario", usuario) cmd.Parameters.Add(userParam) Dim skin As String = "" Dim reader As SqlDataReader Dim previousConnectionState As ConnectionState = conn.State Try If conn.State = ConnectionState.Closed Then conn.Open() End If reader = cmd.ExecuteReader() Using reader While reader.Read ' Process SprocResults datareader here. skin = reader.GetValue(0).ToString End While End Using Finally If previousConnectionState = ConnectionState.Closed Then conn.Close() End If End Try If skin.Length > 0 Then RadSkinManager1.Skin = skin End If End If End SubEnd ClassHello Telerik Team,
I want to use the schedulder in a such that all the days of the month comes column wise and rooms in the row wise
I have attached an excel file which shows my requirement.
Is there any way to achive this?
Thanks in advance.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <link href="Styles/StyleSheet1.css" type="text/css" rel="Stylesheet" /> <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" /> <script type="text/javascript"> function ensureSomethingSelected(source, eventargs) { var dropDown = $find("<%=rcb1.ClientID %>"); if (dropDown.get_text() != null && dropDown.get_text() != dropDown.get_emptyMessage()) { args.IsValid = true; } } </script></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Scripts> <%--Needed for JavaScript IntelliSense in VS2010--%> <%--For VS2008 replace RadScriptManager with ScriptManager--%> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" /> </Scripts> </telerik:RadScriptManager> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> </telerik:RadAjaxManager><div id="cont1"> <h1>SouthWinds Mfg.</h1> <div style="overflow:auto;"> <asp:Label ID="lblMessage" runat="server" Text=""></asp:Label> </div> <hr /> <div id="navButtons"> <div style="float:left; width:100px;"> <asp:Button ID="btnBack" runat="server" Text="Back" CausesValidation="false" OnClick="btnBack_Click"/> </div> <div style="float:right;width:100px;"> <asp:Button ID="btnForward" runat="server" Text="Forward" CausesValidation="false" OnClick="btnForward_Click" /> </div> </div> <hr /> <div class="class1"> <asp:Label ID="Label1" runat="server" Text="ID" CssClass="formLabels"></asp:Label> <asp:Label ID="lblID" runat="server"></asp:Label> </div> <div class="class1"> <asp:Label ID="Label2" runat="server" AssociatedControlID="txt2" Text="MFG NO" CssClass="formLabels"></asp:Label> <asp:TextBox ID="txt2" runat="server"></asp:TextBox> </div> <div class="class1"> <asp:Label ID="Label3" runat="server" AssociatedControlID="txt3" Text="PART NO" CssClass="formLabels"></asp:Label> <asp:TextBox ID="txt3" runat="server"></asp:TextBox> </div> <div class="class1"> <asp:Label ID="Label4" runat="server" AssociatedControlID="txt4" Text="DESCR" CssClass="formLabels"></asp:Label> <asp:TextBox ID="txt4" runat="server"></asp:TextBox> </div> <div class="class1">If you do not see your parent, please type it in:</div> <div id="cont0"> <telerik:RadAjaxPanel ID="rap1" runat="server"> <telerik:RadComboBox ID="rcb1" runat="server" ClientIDMode="Static" EnableLoadOnDemand="true" EnableVirtualScrolling="true" ShowMoreResultsBox="true" OnItemsRequested="rcb1_ItemsRequested" Width="200" > </telerik:RadComboBox> </telerik:RadAjaxPanel> </div> <div style="float:none;"> <asp:CustomValidator ID="cv1" runat="server" ValidateEmptyText="true" ControlToValidate="rcb1" EnableClientScript="true" ClientValidationFunction="ensureSomethingSelected" ErrorMessage="You must select an item!" OnServerValidate="rcb1_ServerValidate"> </asp:CustomValidator> </div> <div class="buttonBar"> <asp:Button ID="btn1" runat="server" Text="Save" OnClick="btn1_Click" /> </form></body></html>using System;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Data;using System.Data.SqlClient;using System.Configuration;using System.Web.Security;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using Telerik.Web.UI;public partial class Default : System.Web.UI.Page { private const int ItemsPerRequest = 10; protected void Page_Init(object sender, EventArgs e) { } protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { LoadPart(); } //***RESET INFORMATION MESSAGES lblMessage.Text = ""; } protected void btn1_Click(object sender, EventArgs e) { if (IsValid) { } } protected void LoadPart() { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["widConn"].ToString()); SqlCommand cmd = new SqlCommand("SELECT * FROM PARTS", con); DataSet ds = new DataSet("dsParts"); DataTable dt = new DataTable("dtParts"); SqlDataAdapter da = new SqlDataAdapter(cmd); int currIndex = 0; ViewState["currIndex"] = currIndex; using (con) { con.Open(); da.Fill(ds); dt = ds.Tables[0]; ViewState["dtParts"] = dt; ViewState["rowCount"] = dt.Rows.Count; lblID.Text = Convert.ToString(dt.Rows[currIndex][0]); txt2.Text = (string)dt.Rows[currIndex][1]; txt3.Text = (string)dt.Rows[currIndex][2]; txt4.Text = Convert.ToString(dt.Rows[currIndex][3]); } } protected void rcb1_ServerValidate(object source, ServerValidateEventArgs args) { } protected void rcb1_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) { DataTable data = GetData(e.Text); int itemOffset = e.NumberOfItems; int endOffset = Math.Min(itemOffset + ItemsPerRequest, data.Rows.Count); e.EndOfItems = endOffset == data.Rows.Count; for (int i = itemOffset; i < endOffset; i++) { rcb1.Items.Add(new RadComboBoxItem(data.Rows[i]["FULLY_QUALIFIED_PART_NO"].ToString(), data.Rows[i]["ID"].ToString())); } e.Message = GetStatusMessage(endOffset, data.Rows.Count); } private static DataTable GetData(string text) { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["widConn"].ConnectionString); SqlDataAdapter adapter = new SqlDataAdapter("usp_GetMfgPartsScrolling", con); adapter.SelectCommand.CommandType = CommandType.StoredProcedure; adapter.SelectCommand.Parameters.AddWithValue("@text", text); DataTable data = new DataTable(); using (con) { con.Open(); adapter.Fill(data); } return data; } private static string GetStatusMessage(int offset, int total) { if (total <= 0) return "No matches"; return String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", offset, total); } protected void btnForward_Click(object sender, EventArgs e) { DataTable dt = (DataTable)ViewState["dtParts"]; int currIndex = (Int32)ViewState["currIndex"]; int rowCount = (Int32)ViewState["rowCount"]; if ((currIndex + 1) < rowCount) { lblID.Text = Convert.ToString(dt.Rows[currIndex + 1][0]); txt2.Text = (string)dt.Rows[currIndex + 1][1]; txt3.Text = (string)dt.Rows[currIndex + 1][2]; ViewState["currIndex"] = currIndex + 1; } else { lblMessage.Text = "You are at the end of the recordset"; } } protected void btnBack_Click(object sender, EventArgs e) { DataTable dt = (DataTable)ViewState["dtParts"]; int currIndex = (Int32)ViewState["currIndex"]; if (currIndex - 1 >= 0) { lblID.Text = Convert.ToString(dt.Rows[currIndex - 1][0]); txt2.Text = (string)dt.Rows[currIndex - 1][1]; txt3.Text = (string)dt.Rows[currIndex - 1][2]; ViewState["currIndex"] = currIndex - 1; } else { lblMessage.Text = "You are at the beginning of the recordset"; } } }<telerik:RadDatePicker runat="server" ID="StartDate" Width="100px" MinDate="1960-01-01"> <ClientEvents OnDateSelected="StartDateSelected" /> <Calendar ID="Calendar1" RangeMinDate="1960-01-01" runat="server"/></telerik:RadDatePicker> <telerik:RadDatePicker runat="server" ID="EndDate" Width="100px" MinDate="1960-01-01"> <Calendar ID="Calendar2" RangeMinDate="1960-01-01" runat="server" /></telerik:RadDatePicker> function StartDateSelected(sender, eventArgs) { var $ = $telerik.$; var endDatejQueryObject = $("[id$='Form_EndDate']"); var endDatePicker = $find(endDatejQueryObject.attr("id")); var newDate = new Date(eventArgs.get_newValue()); endDatePicker.set_selectedDate(newDate);}<
telerik:RadTreeView ID="RadTreeViewCodeTypes" runat="server" OnNodeExpand="RadTree_OnNodeExpand"
Skin="HCPro" EnableEmbeddedSkins="false" Width="245px" OnNodeClick="RadTree_OnNodeClick"
Style="white-space: normal" SingleExpandPath="true" >
<DataBindings>
<telerik:RadTreeNodeBinding Expanded="false" ExpandMode="ServerSide"/>
</DataBindings>
</telerik:RadTreeView>
Code behind:
RadTreeViewCodeTypes.DataFieldID = "ID";
RadTreeViewCodeTypes.DataFieldParentID = "ParentCode";
RadTreeViewCodeTypes.DataTextField = "TextCode";
RadTreeViewCodeTypes.DataValueField = "ID";
RadTreeViewCodeTypes.DataSource = TreeviewList;
RadTreeViewCodeTypes.DataBind();
after this binding
foreach (RadTreeNode node in RadTreeViewCodeTypes.GetAllNodes())
{
if (node.Value == Session["SearchCode"].ToString())
{
if (!node.Expanded)
{
node.ParentNode.ExpandChildNodes();
node.Selected = true;
RadTreeNode Node = new RadTreeNode();
Node = node.ParentNode;
while (Node.ParentNode != null)
{
Node.Expanded = true;
Node = Node.ParentNode;
}
node.Selected = true;
}
}
}
Thanks,
Arunshyam. S

