or
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadSchedulerTemplate" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="RadSchedulerTemplate"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadSchedulerTemplate" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager>Dim app As Appointment = e.AppointmentDim subject As String = app.SubjectDim startDate As DateTime = app.StartDim endDate As DateTime = app.EndDim recurrenceRule As String = app.RecurrenceRuleDim recurrenceParentID As Integer = app.RecurrenceParentIDDim description As String = app.DescriptiondbConnection.ConnectionString = ConfigurationManager.ConnectionStrings("Test").ConnectionStringdbConnection.Open()dbCommand = dbConnection.CreateCommanddbCommand.CommandType = CommandType.StoredProceduredbCommand.CommandText = "S_Test"dbCommand.Parameters.Add("@Subject", SqlDbType.VarChar).Value = subjectdbCommand.Parameters.Add("@StartDate", SqlDbType.DateTime).Value = startDatedbCommand.Parameters.Add("@EndDate", SqlDbType.DateTime).Value = endDateIf Not String.IsNullOrEmpty(recurrenceRule) Then dbCommand.Parameters.Add("@RecurrenceRule", SqlDbType.VarChar).Value = recurrenceRuleEnd IfIf recurrenceParentID <> 0 Then dbCommand.Parameters.Add("@RecurrenceParentID", SqlDbType.Int).Value = recurrenceParentIDEnd IfIf Not String.IsNullOrEmpty(description) Then dbCommand.Parameters.Add("@Description", SqlDbType.VarChar).Value = descriptionEnd IfdbCommand.ExecuteNonQuery()RadSchedulerTemplate.Rebind()
protected void Page_Load(object sender, EventArgs e){ RadListBox1.ItemDataBound += new Telerik.Web.UI.RadListBoxItemEventHandler(RadListBox1_ItemDataBound); RadListBox1.SelectedIndexChanged += new EventHandler(RadListBox1_SelectedIndexChanged); }void RadListBox1_SelectedIndexChanged(object sender, EventArgs e){ #region Start mode customization via Web Query String int idx = 0; int auto = 0; string qry = ""; try { qry = "auto"; qry = (Request.QueryString[qry] == null) ? "" : Request.QueryString[qry]; if (qry != "") { auto = int.Parse(qry); } } catch { } // Item index try { qry = "item"; qry = (Request.QueryString[qry] == null) ? "" : Request.QueryString[qry]; if (qry != "") { idx = int.Parse(qry); } } catch { } #endregion Literal1.Text = YouTubeScript.Get(RadListView1.SelectedItems[0].GetDataKeyValue("Video_Path").ToString(), auto, _W, _H); Label1.Text = RadListView1.SelectedItems[0].GetDataKeyValue("Video_Path").ToString();}protected void RadListView1_ItemDataBound(object sender, Telerik.Web.UI.RadListViewItemEventArgs e){ Literal1.Text = YouTubeScript.Get(RadListView1.Items[0].GetDataKeyValue("Video_Path").ToString(), 0, _W, _H).ToString(); Label1.Text = RadListView1.Items[0].GetDataKeyValue("Video_Description").ToString();}
|
Hi,
I have a Client Side CustomValidator Control, Is there a way to access selected item's CityCode value from comboxbox's itemtemplate. using client side javascript
--JD
( Please advice, some easy workable workaround )
<telerik:RadComboBox ID="RadComboBox2" Runat="server" TabIndex="3" DropDownWidth="320px" HighlightTemplatedItems="true" DataSourceID="EDSStateList" DataTextField="StateName" DataValueField="StateCode" SelectedValue='<%# Bind("FK_StateCode") %>'> <HeaderTemplate> <ul> <li class="col1">StateName</li> <li class="col2">CityName</li> <li class="col3">CityCode</li> </ul> </HeaderTemplate> <ItemTemplate> <ul> <li class="col1"> <%# DataBinder.Eval(Container.DataItem, "StateName")%></li> <li class="col2"> <%# DataBinder.Eval(Container.DataItem, "CityName")%></li> <li class="col3"> <%# DataBinder.Eval(Container.DataItem, "CityCode") %></li> </ul> </ItemTemplate> <FooterTemplate> </FooterTemplate> </telerik:RadComboBox>