| Public Sub AddAppointments() |
| RadCal.Appointments.Clear() |
| Dim rd As SqlClient.SqlDataReader = Data.SqlHelper.ExecuteReader(ConnString, "dbo.JobSelect") |
| While rd.Read |
| Dim range As New RecurrenceRange |
| range.Start = rd.GetDateTime(12) |
| range.EventDuration = rd.GetDateTime(13) - rd.GetDateTime(12) |
| Select Case rd.GetInt32(5) |
| Case 4 |
| Dim DailyRR As New DailyRecurrenceRule(rd.GetInt32(6), range) |
| Dim da As New Appointment(rd.GetInt32(0), rd.GetDateTime(12), rd.GetDateTime(13), rd.GetString(1), DailyRR.ToString) |
| RadCal.InsertAppointment(da) |
| RadCal.DataKeyField = da.ID |
| RadCal.DataStartField = da.Start |
| RadCal.DataEndField = da.End |
| RadCal.DataSubjectField = da.Subject |
| Case 8 |
| Dim WeeklyRR As New WeeklyRecurrenceRule(rd.GetInt32(10), rd.GetInt32(6), range) |
| Dim da As New Appointment(rd.GetInt32(0), rd.GetDateTime(12), rd.GetDateTime(13), rd.GetString(1), WeeklyRR.ToString) |
| RadCal.InsertAppointment(da) |
| RadCal.DataKeyField = da.ID |
| RadCal.DataStartField = da.Start |
| RadCal.DataEndField = da.End |
| RadCal.DataSubjectField = da.Subject |
| Case 16 |
| Dim MonthlyRR As New MonthlyRecurrenceRule(rd.GetInt32(6), rd.GetInt32(10), range) |
| Dim da As New Appointment(rd.GetInt32(0), rd.GetDateTime(12), rd.GetDateTime(13), rd.GetString(1), MonthlyRR.ToString) |
| RadCal.InsertAppointment(da) |
| RadCal.DataKeyField = da.ID |
| RadCal.DataStartField = da.Start |
| RadCal.DataEndField = da.End |
| RadCal.DataSubjectField = da.Subject |
| Case 32 |
| Dim MonthlyRelativeRR As New MonthlyRecurrenceRule(rd.GetInt32(9), rd.GetInt32(6), rd.GetInt32(10), range) |
| Dim da As New Appointment(rd.GetInt32(0), rd.GetDateTime(12), rd.GetDateTime(13), rd.GetString(1), MonthlyRelativeRR.ToString) |
| RadCal.InsertAppointment(da) |
| RadCal.DataKeyField = da.ID |
| RadCal.DataStartField = da.Start |
| RadCal.DataEndField = da.End |
| RadCal.DataSubjectField = da.Subject |
| End Select |
| End While |
| rd.Close() |
| End Sub |
| <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="TelerikTools.Site1" %> | |
| <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> | |
| <!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>Untitled Page</title> | |
| <asp:ContentPlaceHolder ID="head" runat="server"> | |
| </asp:ContentPlaceHolder> | |
| </head> | |
| <body> | |
| <form id="form1" runat="server"> | |
| <div> | |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> | |
| </telerik:RadAjaxManager> | |
| <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> | |
| </asp:ContentPlaceHolder> | |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server" | |
| height="75px" InitialDelayTime="10" IsSticky="True" MinDisplayTime="5000" | |
| width="75px"> | |
| <img alt="Loading..." src="RadControls/Ajax/Skins/Default/loading1.gif" | |
| style="border:0px;" /><br /> | |
| Add Some Text | |
| </telerik:RadAjaxLoadingPanel> | |
| </div> | |
| </form> | |
| </body> | |
| </html> |
| <%@ Page Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="RadAjaxManager.aspx.cs" Inherits="TelerikTools.RadAjaxManager" %> | |
| <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> | |
| <asp:Content ID="Content1" runat=server ContentPlaceHolderID=ContentPlaceHolder1> | |
| <div> | |
| <telerik:RadScriptManager ID="RadScriptManager1" Runat="server"> | |
| </telerik:RadScriptManager> | |
| </div> | |
| <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" | |
| oncheckedchanged="CheckBox1_CheckedChanged" Text="Check Me" /> | |
| <asp:Label ID="Label1" runat="server"></asp:Label> | |
| <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" | |
| DataSourceID="SqlDataSource1" GridLines="None"> | |
| <MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource1"> | |
| <RowIndicatorColumn> | |
| <HeaderStyle Width="20px"></HeaderStyle> | |
| </RowIndicatorColumn> | |
| <ExpandCollapseColumn> | |
| <HeaderStyle Width="20px"></HeaderStyle> | |
| </ExpandCollapseColumn> | |
| <Columns> | |
| <telerik:GridBoundColumn DataField="STATE_NM" EmptyDataText="&nbsp;" | |
| HeaderText="STATE_NM" SortExpression="STATE_NM" UniqueName="STATE_NM"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="CITY_NM" EmptyDataText="&nbsp;" | |
| HeaderText="CITY_NM" SortExpression="CITY_NM" UniqueName="CITY_NM"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="ZIPCODE" EmptyDataText="&nbsp;" | |
| HeaderText="ZIPCODE" SortExpression="ZIPCODE" UniqueName="ZIPCODE"> | |
| </telerik:GridBoundColumn> | |
| </Columns> | |
| <PagerStyle Mode="NextPrevAndNumeric" /> | |
| </MasterTableView> | |
| <FilterMenu EnableTheming="True"> | |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> | |
| </FilterMenu> | |
| </telerik:RadGrid> | |
| <asp:SqlDataSource ID="SqlDataSource1" runat="server" | |
| ConnectionString="<%$ ConnectionStrings:ConnectionString %>" | |
| ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" | |
| SelectCommand="SELECT "STATE_NM", "CITY_NM", "ZIPCODE" FROM "TBL_STATECITY_V""> | |
| </asp:SqlDataSource> | |
| <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"> | |
| <AjaxSettings> | |
| <telerik:AjaxSetting AjaxControlID="CheckBox1"> | |
| <UpdatedControls> | |
| <telerik:AjaxUpdatedControl ControlID="Label1" /> | |
| </UpdatedControls> | |
| </telerik:AjaxSetting> | |
| <telerik:AjaxSetting AjaxControlID="RadGrid1"> | |
| <UpdatedControls> | |
| <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> | |
| </UpdatedControls> | |
| </telerik:AjaxSetting> | |
| </AjaxSettings> | |
| </telerik:RadAjaxManagerProxy> | |
| </asp:Content> |
| using System; | |
| using System.Collections; | |
| using System.Configuration; | |
| using System.Data; | |
| using System.Linq; | |
| using System.Web; | |
| using System.Web.Security; | |
| using System.Web.UI; | |
| using System.Web.UI.HtmlControls; | |
| using System.Web.UI.WebControls; | |
| using System.Web.UI.WebControls.WebParts; | |
| using System.Xml.Linq; | |
| namespace TelerikTools | |
| { | |
| public partial class RadAjaxManager : System.Web.UI.Page | |
| { | |
| protected void Page_Load(object sender, EventArgs e) | |
| { | |
| } | |
| protected void CheckBox1_CheckedChanged(object sender, EventArgs e) | |
| { | |
| System.Threading.Thread.Sleep(1000); | |
| if (CheckBox1.Checked) | |
| { | |
| Label1.Text = "This box is checked"; | |
| } | |
| else | |
| { | |
| Label1.Text = "The box is NOT checked"; | |
| } | |
| } | |
| } | |
| } | |
| <telerik:RadGrid ID="RadGrid1" runat="server" BorderColor="Black" |
| DataSourceID="SqlDataSource1" OnColumnCreated="RadGrid1_ColumnCreated" |
| AutoGenerateColumns="False" GridLines="None" > |
| <ClientSettings> |
| <Scrolling AllowScroll="True" UseStaticHeaders="True" |
| FrozenColumnsCount="1"> |
| </Scrolling> |
| </ClientSettings> |
Hopefully this is a very easy one. How do I set the selected text property declaritively with the bind syntax? I do not want selectedvalue, i need to use SelectedText or the Telerik equivalent?
This does not work and there is no "SelectedText" property:
| <telerik:RadComboBox ID="rcbCategory" runat="server" |
| DataSourceID="odsCategories" DataTextField="Category" |
| DataValueField="CategoryID" Width="75px" |
| ShowDropDownOnTextboxClick="true" |
| Height="150px" Text='<%# Bind("CategoryName") %>'> |
| </telerik:RadComboBox> |
Thanks!
If
(TypeOf (e.Item) Is GridDataItem) Then
Dim dataBoundItem As GridDataItem = Nothing
Dim bFound As Boolean = False
Try
dataBoundItem = e.Item
If Session("sessSaveIds") <> "" Then
Dim sArrayString As String = Session("sessSaveIds")
Dim sArray() As String = sArrayString.Split(",")
Dim sID As String
For Each sID In sArray
If dataBoundItem("user_id").Text = sID Then
bFound =
True
Exit For
End If
Next
If bFound = True Then
dataBoundItem.Edit =
True
Else
dataBoundItem.Edit =
False
End If
End If ...