Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
96 views
Hi guys,
     How can I display the filesize next to my filename in asyncupload. Got any idea. Please share :)
thanks
Savyo
Princy
Top achievements
Rank 2
 answered on 04 Oct 2012
1 answer
27 views
Hello,
 I got some trouble during learning of  product.
It looks like Telerik provide huge flexibility on client side but I got (I think base issues) thanks I can’t resolve with out your help.
1. Update panel is not show at all, in grid status status bar,
2. Filer grid doesn’t work from JS part (in your examples it does)
3. OnDataBundel doesn’t call on page size changes. And images is not show.


Could you please help me thank. 


Looking forward to get answer from you


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="Bekey.layouts.BeKey.Test" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2012.2.912.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title>Test</title>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript" src="../../assets/js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript">
        function page_init() {
            //$('.tbl_row:odd').addClass('tr_odd');
            //$('.tbl_row:even').addClass('tr_even');
            $('.show_tip').hover(function () {
                $(this).find('.td_tooltip').show();
            }, function () {
                $(this).find('.td_tooltip').hide();
            });
        }
 
        //
        function IsBundle(item) {
            var fieldName = "type";
            var value = item[fieldName];
            return value.toLowerCase() != "Address".toLowerCase();
        }
 
        function RowDataBound(sender, args) {
            var imageurl;
 
            if (!IsBundle(args.get_dataItem())) {
                imageurl = "/assets/images/address_icon.png";
            } else {
                imageurl = "/assets/images/bundle_icon.png";
            }
            $(args.get_item().findElement("AccessTypeImage")).attr("src", imageurl);
        }
 
        function AccessRowDeleting(sender, eventArgs) {
            var item = eventArgs.get_gridDataItem().get_dataItem();
            var isBundle = IsBundle(item);
            var paramData = JSON.stringify({ "access": item, "isBondle": isBundle });
            $.ajax({
                type: "POST",
                url: "/services/netkey.svc/DeleteAccess",
                contentType: "application/json",
                data: paramData,
                success: function (result) {
                    alert(result);
                },
                error: function (xhr) {
                    // console(xhr);
                }
            });
        }
 
        function RequestStart(sender, eventArgs) {
            alert('Request start initiated by: ' + eventArgs.get_eventTarget());
        }
 
        function ResponseEnd() {
        }
    </script>
</telerik:RadCodeBlock>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadLoadingPanel">
                        <AjaxSettings>
                            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                                <UpdatedControls>
                                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                                </UpdatedControls>
                            </telerik:AjaxSetting>
                        </AjaxSettings>
                        <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
                    </telerik:RadAjaxManager>
 
                    <telerik:RadAjaxLoadingPanel runat="server" ID="RadLoadingPanel" Skin="Default" InitialDelayTime="0"
                        MinDisplayTime="1000" Transparency="25">
                        <div style="background-color: #000000; width: 100%; height: 100%">
                            <img id="imgLoader" src="/assets/images/ajax_loader.gif" />
                        </div>
                    </telerik:RadAjaxLoadingPanel>
 
                    <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" AllowPaging="True"
                        AllowFilteringByColumn="True" AutoGenerateColumns="False" ShowStatusBar="true"
                        CellSpacing="0" GridLines="None">
                        <MasterTableView>
                            <Columns>
                                <telerik:GridImageColumn UniqueName="AccessTypeImage" DataAlternateTextField="type">
                                    <FilterTemplate>
                                        <telerik:RadComboBox runat="server" DataTextField="Value" DataValueField="Key" ID="cmbTypeFilter"
                                            OnClientSelectedIndexChanged="TypeSelectedIndexChanged">
                                            <Items>
                                                <telerik:RadComboBoxItem Text="All" />
                                                <telerik:RadComboBoxItem Text="Address" />
                                                <telerik:RadComboBoxItem Text="Bundle" />
                                            </Items>
                                        </telerik:RadComboBox>
                                        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                                            <script type="text/javascript">
                                                function TypeSelectedIndexChanged(sender, args) {
                                                    var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                    var item = args.get_item();
                                                    var equalFilter = Telerik.Web.UI.GridFilterFunction.EqualTo;
                                                    var noFilter = Telerik.Web.UI.GridFilterFunction.NoFilter;
                                                    tableView.filter("type", item.get_text(), item.get_text() != "All" ? equalFilter : noFilter);
                                                
                                            </script>
                                        </telerik:RadScriptBlock>
                                    </FilterTemplate>
                                </telerik:GridImageColumn>
                                <telerik:GridBoundColumn DataField="zipCode" HeaderText="ZIP OR BUNDLE NAME">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="roadName" HeaderText="ADDRESS">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="addressType" HeaderText="TYPE">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="fromDatetime" HeaderText="FROM" DataFormatString="{0:MM/dd/yyyy}"
                                    ReadOnly="True" SortExpression="Dates">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="toDatetime" DataFormatString="{0:MM/dd/yyyy}"
                                    ReadOnly="True" HeaderText="TO">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="userName" HeaderText="USER">
                                </telerik:GridBoundColumn>
                                <telerik:GridClientDeleteColumn ConfirmTextFields="USER" ConfirmDialogType="Classic"
                                    ConfirmTextFormatString="Are you sure to delete {0}?" HeaderStyle-Width="35px"
                                    ButtonType="ImageButton" ImageUrl="/assets/images/close_del.png" DataTextField="userName"
                                    FilterControlAltText="Filter colDelete column" UniqueName="colDelete">
                                    <HeaderStyle Width="35px"></HeaderStyle>
                                </telerik:GridClientDeleteColumn>
                            </Columns>
                            <PagerStyle AlwaysVisible="True"></PagerStyle>
                        </MasterTableView>
                        <ClientSettings ReorderColumnsOnClient="True">
                            <ClientEvents OnRowDataBound="RowDataBound" OnRowDeleting="AccessRowDeleting" />
                            <DataBinding SelectMethod="GetAccessData" Location="/services/my.svc" SortParameterType="Linq"
                                FilterParameterType="Linq" >
                            </DataBinding>
                        </ClientSettings>
                    </telerik:RadGrid>
    </div>
    </form>
</body>
</html>
Andrey
Telerik team
 answered on 04 Oct 2012
3 answers
97 views
I am trying to add a custom webpart into a publishing html field that has radeditor applied to it. I am using radeditor 6.2 and this is in SP2010.
I can add the webpart, but it doesn't function properly at all. When clicking on the webpart drown down icon nothing happens. Also any updates to the webpart code are not reflected unless I delete it out and re-add it. I tried the same thing inside a publishing html field where radeditor was not present and it worked as expected. I've set both the AllowSpecialTags and AllowScripts fields to be true. Radeditor seems to be stripping something out that prevents the webpart from wiring up correctly.

Please help.
Rumen
Telerik team
 answered on 04 Oct 2012
6 answers
193 views

Hi, I have a scheduler control setup. I can have a variable number of user resources which are used to group the appointments, so columns can go off the right edge of the screen.

 

I have some code that works for radgrids which setup the viewport and allows scrolling while draggin. While this might work for the scheduler, the problem is that as soon as you drag an appointment off the right side of the screen, it is no longer “being dragged”

 

Is there a way to allow scrolling through columns off the right side of the screen while dragging an appointment?

 

Thanks

 

James

 

James
Top achievements
Rank 1
 answered on 04 Oct 2012
1 answer
95 views
Hello.
We have some older Visual Studio projects which was coded with the Telerik DLL version 2008.2.723.20.

After installing Visual Studio 2012 on the machine I opened up 1 of these projects, because a small change was needed.
The project was converted to VS2012 without errors, but now I can not build anymore, I keep getting the error:

The type or namespace name 'Telerik' could not be found (are you missing a using directive or an assembly reference?)

But the DLL is in references as I should be, I hope someone can help me out with this.
Kate
Telerik team
 answered on 04 Oct 2012
3 answers
150 views
Hi
I have a RadScheduler set in timeline mode and I need to display a period of 3 days before and 30 behind a certain date.
When I select the date on the date picker the actual selected date of the timeline has to be SelectedDate.AddDays(-3).
I tried this:
protected void dispTimeline_NavigationCommand(object sender, Telerik.Web.UI.SchedulerNavigationCommandEventArgs e)
        {
            switch (e.Command)
            {
                case Telerik.Web.UI.SchedulerNavigationCommand.NavigateToPreviousPeriod:
                    dispTimeline.SelectedDate = dispTimeline.SelectedDate.AddDays(-1);
                    e.Cancel = true;
                    break;
                case Telerik.Web.UI.SchedulerNavigationCommand.NavigateToNextPeriod:
                    dispTimeline.SelectedDate = dispTimeline.SelectedDate.AddDays(1);
                    e.Cancel = true;
                    break;
                case SchedulerNavigationCommand.SwitchToSelectedDay:
                    dispTimeline.SelectedDate = e.SelectedDate.AddDays(-3);
                    e.Cancel = true;
                    break;
                case SchedulerNavigationCommand.NavigateToSelectedDate:
                    RadCalendar popupCalendar = dispTimeline.FindControl("SelectedDateCalendar") as RadCalendar;
                    dispTimeline.SelectedDate = popupCalendar.SelectedDate.AddDays(-3);
                    // this doesn't work either
                    //dispTimeline.SelectedDate = popupCalendar.FocusedDate;
                    e.Cancel = true;
                    break;
            }
        }

 the SelectedDate of the popupCalendar is the same as the SelectedDate of the timeline and not the date I selected on the page.
After the date is selected in the calendar picker the page does a postback so I tried grabbing the PreRender event of the timeline and see if there is the date that i selected somewhere in the event args but no luck.

How can I find this date, currently if I select a date from the calendar no date is changed so maybe it is my fault so here is my timeline definition
<telerik:RadScheduler ID="dispTimeline" runat="server" DataDescriptionField="Observations"
    DataEndField="ToDate" DataKeyField="ReservationID" DataSourceID="SqlDataSource1"
    DataStartField="FromDate" DataSubjectField="Description"
    DayEndTime="23:59:00" DayStartTime="00:00:00"
    EnableDescriptionField="True" FirstDayOfWeek="Monday"
    HoursPanelTimeFormat="H:mm" LastDayOfWeek="Sunday" SelectedView="TimelineView"
    TimeLabelRowSpan="1" TimeZoneID="GTB Standard Time" TimeZoneOffset="02:00:00"
    WorkDayEndTime="18:00:00" WorkDayStartTime="09:00:00" MinimumInlineFormHeight="200"
    OverflowBehavior="Expand" Localization-HeaderMultiDay="Work Week"
    ColumnWidth="50px" ShowViewTabs="False" OnNavigationCommand="dispTimeline_NavigationCommand"
    AllowDelete="False" AllowEdit="False" AllowInsert="False" OnAppointmentClick="dispTimeline_AppointmentClick"
    GroupingDirection="Vertical" OnDataBound="dispTimeline_DataBound" OnNavigationComplete="dispTimeline_NavigationComplete" SelectedDate="2012-10-01" OnPreRender="dispTimeline_PreRender">
    <AdvancedForm Modal="true" Enabled="False" />
    <ResourceTypes>
        <telerik:ResourceType Name="grpTimeline" DataSourceID="dsGrup" KeyField="ID" TextField="Denumire" ForeignKeyField="" />
        <telerik:ResourceType KeyField="StatusID" Name="Status" TextField="Description" ForeignKeyField="StatusID" DataSourceID="dsStatus" />
    </ResourceTypes>
    <ResourceStyles>
        <telerik:ResourceStyleMapping Type="Status" Text="Rezervare" ApplyCssClass="rsCategoryGreen" />
        <telerik:ResourceStyleMapping Type="Status" Text="Contract in derulare" ApplyCssClass="rsCategoryRed" />
        <telerik:ResourceStyleMapping Type="Status" Text="Contract inchis" ApplyCssClass="rsCategoryBlue" />
        <telerik:ResourceStyleMapping Type="Status" Text="Contract facturat" ApplyCssClass="rsCategoryDarkBlue" />
        <telerik:ResourceStyleMapping Type="Status" Text="Alte rezervari" ApplyCssClass="rsCategoryYellow" />
        <telerik:ResourceStyleMapping Type="Status" Text="Indisponibil" BackColor="DarkGray" />
    </ResourceStyles>
    <Localization HeaderMultiDay="Work Week"></Localization>
 
    <TimelineView HeaderDateFormat="dd.MMM.yyyy" NumberOfSlots="35" SlotDuration="1.00:00:00"
        UserSelectable="true" SortingMode="Global" ColumnHeaderDateFormat="dd.MMM" />
    <MultiDayView UserSelectable="false" />
    <DayView UserSelectable="false" />
    <WeekView UserSelectable="false" />
    <MonthView UserSelectable="false" />
</telerik:RadScheduler>

Thank you
Claudiu Dordea
Top achievements
Rank 1
 answered on 04 Oct 2012
1 answer
69 views
I'm using the Clear_filters routine that was posted elsewhere on the Telerik site.  It works fine and DOES reset the Grid by removing any filters, including the dates from the radDatePicker, however, it doesn't change the display date on the Calendar back to the Default date?

The below doesn't work.
Protected Sub Clearfilters_Click(sender As Object, e As System.EventArgs) Handles Clearfilters.Click
       RiskAssessmentsGrid.MasterTableView.FilterExpression = String.Empty
 
       For Each column As GridColumn In RiskAssessmentsGrid.MasterTableView.RenderColumns
           If TypeOf column Is GridBoundColumn Then
               Dim boundColumn As GridBoundColumn = TryCast(column, GridBoundColumn)
               boundColumn.CurrentFilterValue = String.Empty
           End If
       Next
 
 
       For Each item As GridFilteringItem In RiskAssessmentsGrid.MasterTableView.GetItems(GridItemType.FilteringItem)
 
           Dim f As RadDatePicker = DirectCast(item.FindControl("FromDateCreatedPicker"), RadDatePicker)
           Dim t As RadDatePicker = DirectCast(item.FindControl("ToDateCreatedPicker"), RadDatePicker)
 
           f.SelectedDate = DateTime.Now.Date
           t.SelectedDate = DateTime.Now.Date
 
       Next
 
       RiskAssessmentsGrid.MasterTableView.Rebind()
       RiskAssessmentsGrid.Rebind()
 
   End Sub
Daniel
Telerik team
 answered on 04 Oct 2012
3 answers
599 views
I am using a EadMaskedTextBox to gather a credit card number.  Unfortunately, previous credit card numbers can be revealed when entering the credit card number due to the default AutoCompleteType on the base input control that is rendered.

Is there any way to disable the AutoComplete behavior on my RadMaskedTextBox?
Galin
Telerik team
 answered on 04 Oct 2012
1 answer
292 views
I'm currently working on using RadWindows for the first time.
I've been able to figure that using the "ClientShow" I can pass an argument to the RadWindow and catch it in the window on the client side, However I need this on the server side once I get here.

Here's what I'm using on the client side for the parent page:
function clientShow(sender, eventArgs) {
         var tree = $find("<%= tvwBidPackageFolders.ClientID %>");
         var node = tree.get_selectedNode();
           
           if (node) {
               var attributes = node.get_attributes();
               var attribute1 = attributes.getAttribute("fid");
               sender.argument = attribute1;
                          }    
        }

I'm able to run this client code on the RadWindow and get the argument:
function pageLoad() {
           txtInput = $get('txtUserInput');
           var currentWindow = GetRadWindow();
           txtInput.value = currentWindow.argument;
       }

Now on the server, I've tried Load, PreRender, etc. hoping that the txtInput will be filled and it's always blank.
How can I get the currentWindow.argument value in the server side?
Marin Bratanov
Telerik team
 answered on 04 Oct 2012
3 answers
74 views

Hello,

I'm using RadToolTip in a RadScheduler with sqldatasource and i can see only and empty RadScheduler. Also, when i press the Save button a null reference exception arises in the following line of the Radscheduler1_AppointmentCreated method: string id = e.Appointment.ID.ToString; (The DataItem and the ID are null). The data insert to the database. 

What am i doing wrong;

Thank you very much.

P.S.

I have writthen the following code:

aspx code

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                <Scripts>
                    <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>
            <script type="text/javascript">
 
 
                function hideActiveToolTip() {
                    var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();
                    if (tooltip) {
                        tooltip.hide();
                    }
                }
 
                Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequestHandler);
                function beginRequestHandler(sender, args) {
                    var prm = Sys.WebForms.PageRequestManager.getInstance();
                    if (args.get_postBackElement().id.indexOf('RadScheduler1') != -1) {
                        hideActiveToolTip();
                    }
                }
 
                function OnClientRequestStart(sender, args) {
                    args.set_cancel(true);
                    var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();
                    if (tooltip) {
                        var element = tooltip.get_targetControl();
                        var apt = $find("<%=RadScheduler1.ClientID %>").getAppointmentFromDomElement(element);
                        $get("startTime").innerHTML = apt.get_start().format("MM/dd/yyyy HH:mm");
                        $get("endTime").innerHTML = apt.get_end().format("MM/dd/yyyy HH:mm");
                        $get("descriptionDiv").innerHTML = apt.get_subject();
                        tooltip.set_text($get("contentContainer").innerHTML);
                    }
                }
 
                function OnClientAppointmentContextMenu(sender, args) {
                    hideActiveToolTip();
                }
            </script>
       
            <telerik:RadScheduler runat="server" ID="RadScheduler1" Width="750px" TimeZoneOffset="03:00:00" EnableDescriptionField="true"
                    SelectedDate="2012-04-16" DayStartTime="08:00:00" DayEndTime="18:00:00" DataSourceID="SqlDataSource1"
                    DataKeyField="ID" DataSubjectField="Subject" DataDescriptionField="Description" DataStartField="Start" DataEndField="End"
                    DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID"
                    DisplayDeleteConfirmation="true" SelectedView="WeekView" OnClientAppointmentContextMenu="OnClientAppointmentContextMenu" CustomAttributeNames="LastModified, Annotations, User">
                    <AdvancedForm Modal="true" />
                    <TimelineView UserSelectable="false" />
                    <TimeSlotContextMenuSettings EnableDefault="true" />
                    <AppointmentContextMenuSettings EnableDefault="true" />
                </telerik:RadScheduler>
            <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Width="320" Height="170"
                Animation="None" HideEvent="Default" Text="Loading..." OnAjaxUpdate="RadToolTipManager1_AjaxUpdate" />
            <div style="display: none;">
                <div id="contentContainer">
                    <div class="appointment-tooltip">
                        <p>
                            Starts on: <span id="startTime">
                                <!-- -->
                            </span>
                            <br />
                            Ends on: <span id="endTime">
                                <!-- -->
                            </span>
                        </p>
                        <hr />
                        Description:
                        <div id="descriptionDiv">
                        </div>
                    </div>
                </div>
            </div>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HumanResourcesConnectionString %>"
                DeleteCommand="DELETE FROM [Schedule] WHERE [ID] = @ID" InsertCommand="INSERT INTO [Schedule] ([Subject], [Description], [Start], [End], [RecurrenceRule], [RecurrenceParentID], [User], [LastModified]) VALUES (@Subject, @Description, @Start, @End, @RecurrenceRule, @RecurrenceParentID, @User, @LastModified)"
                SelectCommand="SELECT * FROM [Schedule]"
                UpdateCommand="UPDATE [Schedule] SET [Subject] = @Subject, [Description]=@Description, [Start] = @Start, [End] = @End, [RecurrenceRule]=@RecurrenceRule, [RecurrenceParentID]=@RecurrenceParentID, [User]=@User, [LastModified]=@LastModified WHERE [ID] = @ID">
                <SelectParameters>
                    <asp:SessionParameter Name="User" SessionField="User" DefaultValue="" />
                </SelectParameters>
                <DeleteParameters>
                    <asp:Parameter Name="ID" Type="Int32" />
                </DeleteParameters>
                <UpdateParameters>
                    <asp:Parameter Name="Subject" Type="String" />
                    <asp:Parameter Name="Description" Type="String" />
                    <asp:Parameter Name="Start" Type="DateTime" />
                    <asp:Parameter Name="End" Type="DateTime" />
                    <asp:Parameter Name="ID" Type="Int32" />
                    <asp:Parameter Name="RecurrenceRule" Type="String" />
                    <asp:Parameter Name="RecurrenceParentID" Type="Int32" />
                    <asp:Parameter Name="Annotations" Type="String" />
                    <asp:SessionParameter Name="User" SessionField="User" DefaultValue="" />
                    <asp:Parameter Name="LastModified" Type="String" />
                </UpdateParameters>
                <InsertParameters>
                    <asp:Parameter Name="Subject" Type="String" />
                    <asp:Parameter Name="Description" Type="String" />
                    <asp:Parameter Name="Start" Type="DateTime" />
                    <asp:Parameter Name="End" Type="DateTime" />
                    <asp:Parameter Name="Annotations" Type="String" />
                    <asp:Parameter Name="RecurrenceRule" Type="String" />
                    <asp:Parameter Name="RecurrenceParentID" Type="Int32" />
                    <asp:SessionParameter Name="User" SessionField="User" DefaultValue="" />
                    <asp:Parameter Name="LastModified" Type="String" />
                </InsertParameters>
            </asp:SqlDataSource>


aspx.cs code

public partial class _Default : System.Web.UI.Page
{
    
    private void Page_Load(object sender, EventArgs e)
    {
 
        RadScheduler1.AppointmentCreated += RadScheduler1_AppointmentCreated;
        RadScheduler1.DataBound += RadScheduler1_DataBound;
        RadToolTipManager1.OnClientRequestStart = String.Empty;
   
    }
 
    protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)
    {
 
        RadToolTipManager1.TargetControls.Clear();
        ScriptManager.RegisterStartupScript(this, typeof(Page), "HideToolTip", "hideActiveToolTip();", true);
         
         
    }
     
    protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)
    {
        if (e.Appointment.Visible && !IsAppointmentRegisteredForTooltip(e.Appointment))
        {
 
           
            string id = e.Appointment.ID.ToString();
 
            
 
            foreach (string domElementID in e.Appointment.DomElements)
            {
                RadToolTipManager1.TargetControls.Add(domElementID, id, true);
            }
        }
    }
 
      protected void RadToolTipManager1_AjaxUpdate(object sender, ToolTipUpdateEventArgs e)
        {
            int aptId;
            Appointment apt;
            if (!int.TryParse(e.Value, out aptId))//The appoitnment is occurrence and FindByID expects a string
                apt = RadScheduler1.Appointments.FindByID(e.Value);
            else //The appointment is not occurrence and FindByID expects an int
                apt = RadScheduler1.Appointments.FindByID(aptId);
 
            AppointmentToolTip toolTip = (AppointmentToolTip)LoadControl("AppointmentToolTip.ascx");
            toolTip.TargetAppointment = apt;
            e.UpdatePanel.ContentTemplateContainer.Controls.Add(toolTip);
        }
 
      protected void RadScheduler1_DataBound(object sender, EventArgs e)
      {
          RadToolTipManager1.TargetControls.Clear();
          ScriptManager.RegisterStartupScript(this, typeof(Page), "HideToolTip", "hideActiveToolTip();", true);
      }
 
 
      private bool IsAppointmentRegisteredForTooltip(Appointment apt)
      {
          foreach (ToolTipTargetControl targetControl in RadToolTipManager1.TargetControls)
          {
              if (apt.DomElements.Contains(targetControl.TargetControlID))
              {
                  return true;
              }
          }
 
          return false;
      }
 
    }




Ivana
Telerik team
 answered on 04 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?