or
<telerik:RadGrid ID="RadGrid1" runat="server" Skin="Office2007" AllowPaging="true" AllowCustomPaging="true" PageSize="20" AutoGenerateColumns="False" GridLines="None" AlternatingItemStyle-BackColor="#eeeeee" ShowStatusBar="true" AllowFilteringByColumn="true" AllowSorting="true" EnableLinqExpressions="true" OnPreRender="RadGrid1_PreRender" OnItemDataBound="RadGrid1_ItemDataBound" OnNeedDataSource="RadGrid1_NeedDataSource"> <AlternatingItemStyle BackColor="#EEEEEE"></AlternatingItemStyle> <MasterTableView DataKeyNames="TaskID"> <AlternatingItemStyle BackColor="#EEEEEE"></AlternatingItemStyle> <RowIndicatorColumn> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <Columns> <telerik:GridTemplateColumn SortExpression="StatusCodeTypeName" DataField="StatusCodeTypeName" HeaderText="Status" UniqueName="StatusCodeTypeName"> <ItemTemplate> <telerik:RadComboBox runat="server" ID="DropDownList1" EnableViewState="false" DataTextField="StatusCodeTypeName" DataValueField="StatusCodeTypeID" DataSourceID="SqlDataSource1" OnClientSelectedIndexChanged="UpdateTask" Skin="Office2007"> </telerik:RadComboBox> </ItemTemplate> <FilterTemplate> <telerik:RadComboBox ID="rcbStatus" DataTextField="StatusCodeTypeName" DataValueField="StatusCodeTypeName" AppendDataBoundItems="true" Width="150px" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("StatusCodeTypeName").CurrentFilterValue %>' runat="server" OnClientSelectedIndexChanged="ClientNameIndexChanged" Skin="Office2007"> </telerik:RadComboBox> <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> function ClientNameIndexChanged(sender, args) { var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); if (args.get_item().get_value() == "0") { tableView.filter("StatusCodeTypeName", args.get_item().get_value(), "NoFilter"); } else { tableView.filter("StatusCodeTypeName", args.get_item().get_value(), "EqualTo"); } } </script> </telerik:RadScriptBlock> </FilterTemplate> <ItemStyle VerticalAlign="Top" /> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid>GridTemplateColumn
<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();}
|