Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
205 views

Hi all.

 

A client of ours is using the RadScheduler control in ASP.NET Webforms and have noticed an issue where if we:

 

- create a new entry

- drag the entry to, say, the end of the day (i.e 5pm)

- CLICK on it again to drag, it will jump to further up the page (the entry) which is incorrect.

 

Why would this behavior occur and what is the fix for this?

 

I have attached a video for illustration. As you can see, after there is an entry and I click on it to move to a different time slot, it immediately jumps further up the page when it should not.

 

Here is the code:

 


<telerik:RadScheduler ID="RadScheduler1" runat="server" Height="100%"
                RowHeight="22" Skin="Web20" EnableEmbeddedSkins="false" SelectedView="MonthView"
                DayStartTime="07:00:00" DayEndTime="18:00:00" WorkDayStartTime="07:00:00" WorkDayEndTime="17:00:00"
                HoursPanelTimeFormat="hh:mm tt" TimeLabelRowSpan="4" MinutesPerRow="15" NumberOfHoveredRows="1"
                TimelineView-UserSelectable="false" MonthView-AdaptiveRowHeight="false" MonthView-VisibleAppointmentsPerDay="2"
                MonthView-HeaderDateFormat="MMMMMMMMM, yyyy" AdvancedForm-Enabled="false" AdvancedForm-ZIndex="-1"
                StartInsertingInAdvancedForm="true" StartEditingInAdvancedForm="true"

                OnClientAppointmentInserting="InterceptNewAppointmentEvent"
                OnClientAppointmentClick="InterceptAppointmentClickEvent"
                OnClientAppointmentDoubleClick="InterceptAppointmentClickEvent"
                OnClientAppointmentEditing="InterceptAppointmentEditingEvent"
                OnClientAppointmentDeleting="ConfirmAppointmentDelete"
                OnClientAppointmentMoving="AdjustTargetSlotForScroll"
                OnClientAppointmentMoveEnd="ConfirmAppointmentMove"
                OnClientAppointmentResizeEnd="ConfirmAppointmentDurationChange"

                OnAppointmentCreated="RadScheduler1_AppointmentCreated"
                OnAppointmentDelete="DeleteAppointment"
                OnAppointmentUpdate="UpdateAppointment"
                OnAppointmentContextMenuItemClicking="RadScheduler1_AppointmentContextMenuItemClicking"

                OnNavigationComplete="NavigationComplete"

                DisplayDeleteConfirmation="false" DisplayRecurrenceActionDialogOnMove="false"
                >
                <AppointmentContextMenuSettings EnableDefault="true" />
                <TimelineView SlotDuration="00:15:00" GroupingDirection="Vertical"  />
                <AppointmentContextMenus>
                    <telerik:RadSchedulerContextMenu ID="RadSchedulerAppointmentContextMenu1" runat="server">
                        <Items>
                            <telerik:RadMenuItem Text="Duplicate" Value="Duplicate">
                            </telerik:RadMenuItem>
                        </Items>
                    </telerik:RadSchedulerContextMenu>
                </AppointmentContextMenus>
            </telerik:RadScheduler>
            </div>
            <telerik:RadWindowManager ID="radWindowManager" runat="server">
                <Windows>
                    <telerik:RadWindow ID="radDialog" runat="server" Title="" Width="600" Height="644"
                        InitialBehaviors="None" Behaviors="None" BorderWidth="0" KeepInScreenBounds="true"
                        VisibleOnPageLoad="false" VisibleStatusbar="false" VisibleTitlebar="false" Skin="Web20" EnableEmbeddedBaseStylesheet="false"
                        NavigateUrl="" Modal="true" DestroyOnClose="false" ShowContentDuringLoad="false"
                        OnClientClose="ReloadSchedule"  OnClientBeforeShow="document.documentElement.focus();">
                    </telerik:RadWindow>
                </Windows>
            </telerik:RadWindowManager>

 

 

This *could* also be of interest

 


 

/* There was bug in the RadScheduler that offset the floating appointment when the scroll area was anywhere
         * but the top. This function is an attempt to correct that using the element the mouse is currently over,
         * which was still registering correctly. */

function AdjustedTargetSlot(schedulerControl, x, y) {
            elementMouseIsOver = document.elementFromPoint(x, y);
            var adjustedTargetSlot = schedulerControl.get_activeModel().getTimeSlotFromDomElement(elementMouseIsOver);
            return adjustedTargetSlot;
        }

 

function AdjustTargetSlotForScroll(schedulerControl, event) { var scrollDepth = schedulerControl.get_scrollTop() var x = window.event.clientX; var y = window.event.clientY; var elementMouseIsOver = document.elementFromPoint(x, y); event._targetSlot = schedulerControl.get_activeModel().getTimeSlotFromDomElement(elementMouseIsOver); var appointmentObj = event.get_appointment(); var appointmentElem = appointmentObj.get_element(); appointmentElem.style.top += scrollDepth; return; } function MoveAppointment() { // Adjusts the target time slot for the appoinment to the slot under the cursor. var x = window.event.clientX; var y = window.event.clientY; globalEvent._targetSlot = AdjustedTargetSlot(globalSchedulerControl, x, y); globalEvent._newStartTime = event.get_targetSlot().get_startTime(); var appointment = globalEvent.get_appointment(); var parameters = new Object(); parameters.Command = "Move"; parameters.AppointmentID = appointment.get_internalID(); parameters.EditSeries = false; parameters.SourceSlotIndex = appointment.get_timeSlot().get_index(); parameters.TargetSlotIndex = globalEvent.get_targetSlot().get_index(); __doPostBack("RadScheduler1", JSON.stringify(parameters)); return false; }


 

Peter Milchev
Telerik team
 answered on 21 Jun 2022
1 answer
318 views

How do I  set the cursor to the hand pointer for the radcombobox,

Main text box at top and the items in the dropdownlist area.

 

THank

Deasun.

Peter Milchev
Telerik team
 answered on 21 Jun 2022
1 answer
158 views
Hello,

I would like to group values in my pie chart, for example, unite all values less than 20%, how can I?

Thank you very much in advance
Peter Milchev
Telerik team
 answered on 17 Jun 2022
1 answer
490 views

Hi,

I have a "checkbox list" with a few items. The problem is, that when the text for the item is too long it will change its alignment from let to centre automatically.

I need that text to stay left alignment no matter how long it is. 

Please see the attached image to understand what I mean.

Regards,

Omar

 

 

 

Doncho
Telerik team
 answered on 17 Jun 2022
1 answer
279 views

This is a complicated setup and issue, so I'll do my best to keep it succinct:

There are two different web applications - one is Windows authentication, and the other is Forms authentication.

Application #1 (Win authentication) uses a RadEditor to create "posts" or "articles" that could have images within them.  Those images are currently saved/uploaded to a directory that resides in the IIS root.  I've also tried with a virtual directory.

Application #2 (Forms authentication) loads the HTML from these posts created by App #1 into a Literal Control.  Whenever App #2 loads a post that contains an image, the browser asks for domain credentials.  The image will not show unless you supply proper login info.  The rest of the HTML from the post will load fine - just not the images.

I've given permission to the app pool, IIS_USRS, IUSR - even full control.  So far, there is no difference whether this folder has proper permissions, or none... it still prompts for credentials.

How can I allow App #2 to access these images without requiring credentials?

Thank you, in advance.

 

Jeff
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 17 Jun 2022
1 answer
313 views

I have a grid that works perfectly where the EditForm Popup comes up fine if that grid is the only one on the page. However, if I have a second grid on the same page, the popup edit form won't come up.

1st grid:

<telerik:RadGrid ID="grid" runat="server" DataSourceID="sql" Skin="Material" RenderMode="Lightweight" Width="100%">
    <ClientSettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true">
        <Scrolling AllowScroll="True" UseStaticHeaders="true" />
        <Selecting AllowRowSelect="true"></Selecting>
    </ClientSettings>
    <MasterTableView DataKeyNames="CHP_Specialty" EditMode="PopUp" AllowSorting="true" DataSourceID="sql" PagerStyle-AlwaysVisible="true" AllowPaging="True" ShowHeader="true" AutoGenerateColumns="false" CommandItemDisplay="None" CommandItemSettings-ShowRefreshButton="false" AllowAutomaticUpdates="true" HeaderStyle-VerticalAlign="Bottom" ItemStyle-VerticalAlign="Top" AlternatingItemStyle-VerticalAlign="Top" PageSize="50">
        <ColumnGroups>
            <telerik:GridColumnGroup HeaderText="HEDIS Vendor" Name="HEDIS Vendor" HeaderStyle-HorizontalAlign="Center"></telerik:GridColumnGroup>
        </ColumnGroups>
        <Columns>
            <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" HeaderStyle-Width="60px"></telerik:GridEditCommandColumn>
            <telerik:GridBoundColumn DataField="Row_ID" HeaderText="Row ID" SortExpression="Row_ID" Visible="false"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CHP_Specialty" HeaderText="CHP Specialty"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="HEDIS_Vendor_Specialty_Description" HeaderText="Map to Specialty" ColumnGroupName="HEDIS Vendor"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="HEDIS_Vendor_Specailty_Code" HeaderText="Sent to Vendor" ColumnGroupName="HEDIS Vendor"></telerik:GridBoundColumn>
        </Columns>
        <EditFormSettings EditFormType="Template" PopUpSettings-Modal="true" CaptionFormatString="Edit Record">
            <FormTemplate>
                <div class="w3-margin-top"></div>
                <div class="w3-container">
                    <div class="w3-margin-top"></div>
                    <div class="w3-row">
                        <telerik:RadLabel Text="CHP Specialty" Font-Bold="True" runat="server"></telerik:RadLabel>
                    </div>
                    <div class="w3-row">
                        <telerik:RadLabel ID="lblSpecialty" Text='<%# Eval("CHP_Specialty") %>' runat="server"></telerik:RadLabel>
                    </div>
                    <div class="w3-margin-top"></div>
                    <div class="w3-row">
                        <telerik:RadLabel Text="Map to HEDIS Vendor Specialty *" Font-Bold="True" runat="server"></telerik:RadLabel>
                    </div>
                    <div class="w3-row">
                        <telerik:RadComboBox ID="listHEDISVendorSpecialties" MaxHeight="300px" Width="100%" runat="server" EmptyMessage=" " DataSourceID="sqlLookup" DataTextField="Lookup_Description" DataValueField="Lookup_ID" Filter="Contains" SelectedValue='<%# Bind("HEDIS_Vendor_Specialty_ID") %>' DropDownAutoWidth="Enabled"></telerik:RadComboBox>
                        <asp:RequiredFieldValidator runat="server" ErrorMessage="required" Display="Dynamic" ControlToValidate="listHEDISVendorSpecialties" ForeColor="Red" />
                    </div>
                </div>    
                <div class="w3-margin-top"></div>
                <div class="w3-center">
                    <telerik:RadPushButton runat="server" Text="Update" CommandName="Update" CausesValidation="true" Primary="true"></telerik:RadPushButton>
                    <telerik:RadPushButton runat="server" Text="Cancel" CommandName="Cancel" CausesValidation="true" Primary="true"></telerik:RadPushButton>
                </div>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <HeaderStyle VerticalAlign="Bottom" HorizontalAlign="Center" />
    <ItemStyle VerticalAlign="Top" />
    <AlternatingItemStyle VerticalAlign="Top" />
</telerik:RadGrid>

2nd grid:
<telerik:RadGrid ID="gridDetails" runat="server" DataSourceID="sqlDetails" Skin="Material" RenderMode="Lightweight" Width="98%" CssClass="w3-right">
    <ClientSettings>
        <Scrolling AllowScroll="True" UseStaticHeaders="true" />
    </ClientSettings>
    <MasterTableView DataKeyNames="CHP_Specialty" AllowSorting="true" DataSourceID="sqlDetails" PagerStyle-AlwaysVisible="true" AllowPaging="True" ShowHeader="true" AutoGenerateColumns="false" CommandItemDisplay="None" CommandItemSettings-ShowRefreshButton="false" AllowAutomaticUpdates="false" HeaderStyle-VerticalAlign="Bottom" ItemStyle-VerticalAlign="Top" AlternatingItemStyle-VerticalAlign="Top" PageSize="50">
        <Columns>
            <telerik:GridBoundColumn DataField="CHP_Specialty" Visible="false"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Provider_ID" HeaderText="Provider ID"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Practitioner_Name" HeaderText="Provider Name"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Credentials" HeaderText="Credentials"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="NPI" HeaderText="NPI"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Street_Address" HeaderText="Street Address"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="City" HeaderText="City"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Blue_Card" HeaderText="Blue Card"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Is_PCP" HeaderText="PCP"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Is_Primary" HeaderText="Primary?"></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <HeaderStyle VerticalAlign="Bottom" HorizontalAlign="Center" />
    <ItemStyle VerticalAlign="Top" />
    <AlternatingItemStyle VerticalAlign="Top" />
</telerik:RadGrid>

SQLDatasources:
<asp:SqlDataSource ID="sql" runat="server" 
    ConnectionString="<%$ ConnectionStrings:csAIM %>"
    SelectCommand="usp_HEDIS_Maint_Provider_Specialty_XREF" SelectCommandType="StoredProcedure" 
    UpdateCommand="usp_HEDIS_Maint_Provider_Specialty_XREF" UpdateCommandType="StoredProcedure">
    <SelectParameters>
        <asp:Parameter Name="Action" DefaultValue="Select" />
    </SelectParameters>
    <UpdateParameters>
        <asp:Parameter Name="Action" DefaultValue="Update" />
        <asp:Parameter Name="Row_ID" Type="Int32" />
        <asp:Parameter Name="HEDIS_Vendor_Specialty_ID" Type="Int32" />
        <asp:Parameter Name="Comment" Type="String" />
        <asp:SessionParameter Name="User_Name" SessionField="UserID" />
    </UpdateParameters>
</asp:SqlDataSource>

<asp:SqlDataSource ID="sqlDetails" runat="server" 
    ConnectionString="<%$ ConnectionStrings:csAIM %>"
    SelectCommand="usp_HEDIS_Maint_Providers_by_Specialty" SelectCommandType="StoredProcedure">
    <SelectParameters>
        <asp:ControlParameter ControlID="grid" Name="CHP_Specialty" PropertyName="SelectedValue" Type="String"></asp:ControlParameter>
    </SelectParameters>
</asp:SqlDataSource>
Doncho
Telerik team
 answered on 16 Jun 2022
3 answers
818 views

Hi,

is it possible to show the checkbox text on the left side of the checkbox?

<telerik:RadCheckBox runat="server" ID="CloneTripOppositeCheckBox" RenderMode="Lightweight"  Text="label_checkbox" TEXTPOSITION="LEFT"
></telerik:RadCheckBox>

Thank you
Charles
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 14 Jun 2022
1 answer
347 views

I have a master page with the following code:

        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="True" EnableCdn="True" EnablePartialRendering="True">
            <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>

My SignalR Javascript code:

<!--Script references. --> <!--Reference the jQuery library. --> <script src="Scripts/jquery-3.6.0.min.js"></script> <!--Reference the SignalR library. --> <script src="Scripts/jquery.signalR-2.4.3.min.js"></script> <!--Reference the autogenerated SignalR hub script. --> <script src="signalr/hubs"></script><telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> $(function () { // Declare a proxy to reference the hub.

// Error Line var hub = $.connection.progressHub; // Create a function that the hub can call to report progress. hub.client.receiveMessge = function (Item) { $('#<%=lblCurrRec.ClientID%>').html(Item.SITE_CODE); $('#<%=lblStat.ClientID%>').html(Item.STATUS); $('#<%=lblRes.ClientID%>').html(Item.MESSAGE); }; hub.client.UpdateTotal = function (iTotal, iSent, iNotSent) { $('#<%=lblTotal.ClientID%>').html(iTotal); $('#<%=lblRecsProc.ClientID%>').html(iSent); $('#<%=lblErrorRecs.ClientID%>').html(iNotSent); }; $.connection.hub.start(); }); </script> </telerik:RadScriptBlock>

When I run the code I get the following error:

 Cannot read properties of undefined (reading 'progressHub')

If I put all this in it's own test page and replace the RadScriptManager with the following it works flawlessly:

<asp:ScriptManager ID="MainScriptManager" runat="server" EnablePartialRendering="true" EnablePageMethods="true" AsyncPostBackTimeout="600" />
The problem is...other stuff breaks if I don't use the RadScriptManager.  It has something to do with the Telerik.Web.UI.Common.jQuery
Peter Milchev
Telerik team
 answered on 14 Jun 2022
0 answers
134 views

Hi Telerik team,

I noticed Ajax version will load whole folder structure when user open image / document manager. This will cause performance issue if user has very deep folder structure. Is there anyway we can solve this issue, please?

 

Regards,

Lan

lan luo
Top achievements
Rank 1
Iron
 asked on 14 Jun 2022
1 answer
197 views

I would like to be able to check for a file of the same name existing on the server 'before' i postback.

Is there an event i can access right after the file has been uploaded to the temp directory?

 

Thanks,

Dana

Peter Milchev
Telerik team
 answered on 13 Jun 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?