Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
450 views

I am the process of implementing ASP.NET Identity in a Telerik ASP.NET Ajax 2016.1.225 webapplication, due to the client's request for a more modern login (two-factor i.e.)

A few of the comboboxes are using EnableLoadOnDemand, set up with: <WebServiceSettings Method="GetCompanyNames" Path="booker_bestil_service2.aspx" />  

Codebehind signature is:

    [WebMethod(EnableSession = true)]
    public static RadComboBoxData GetCompanyNames(RadComboBoxContext context)

 

After disabling the old formsauthentication, and moving to ASP.NET Identity, this doesn't work. It gives a "Authentication failed", due to the 401 redirect to the login page. Attached is a snip from Fiddler.

How can I setup EnableLoadOnDemand with ASP.NET Identity?

Thanks :-)

aspliid
Top achievements
Rank 1
 asked on 08 Mar 2018
2 answers
238 views

here is my aspx page 

<%@ Page Language="C#" AutoEventWireup="true"  CodeBehind="ScheduleAppointment.aspx.cs" Inherits="iCRA_UI.FieldTech.ScheduleAppointment" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

    <title></title>

 
    <script src="lib/qsf.js"></script>
    <link href="lib/qsf.css" rel="stylesheet" />
    <script src="poupup.js"></script>

   
</head>
<body>
    <form id="form1" runat="server">
 <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />

     <telerik:RadWindowManager RenderMode="Lightweight" ID="RadWindowManager1" runat="server" EnableShadow="true">
        </telerik:RadWindowManager>


   
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ConfigurationPanel1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1">
        <div class="demo-container no-bg">
            <telerik:RadScheduler RenderMode="Lightweight" runat="server" ID="RadScheduler1" GroupBy="Speaker" CustomAttributeNames="Completed" GroupingDirection="Horizontal"
                OnNavigationCommand="RadScheduler1_NavigationCommand" 
                AppointmentStyleMode="Default" DataSourceID="EventsDataSource" DataKeyField="ID"
                FirstDayOfWeek="Monday" LastDayOfWeek="Sunday" DataSubjectField="Description"  RowHeight="40px" EnableTimeZonesEditing="true"
                DataStartField="StartTime" DataEndField="EndTime" DataRecurrenceField="RecurrenceRule"
                SelectedView="DayView" DataRecurrenceParentKeyField="RecurrenceParentID" AllowInsert="true" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" OnAppointmentDelete="RadScheduler1_AppointmentDelete"  OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnResourceHeaderCreated="RadScheduler1_ResourceHeaderCreated"
               
                OverflowBehavior="Auto">
                <AdvancedForm Modal="true"></AdvancedForm>
                <MonthView UserSelectable="true"></MonthView>
                <TimelineView />
                <ResourceHeaderTemplate>
                    <asp:Panel ID="ResourceImageWrapper" runat="server" CssClass="ResCustomClass">
                        <asp:Image ID="SpeakerImage" runat="server" AlternateText='<%= Eval("Text") %>'></asp:Image>
                    </asp:Panel>
                </ResourceHeaderTemplate>
                <ResourceTypes>
                    <telerik:ResourceType KeyField="UserID" Name="Speaker" TextField="Fullname" ForeignKeyField="UserID"
                        DataSourceID="SpeakersDataSource1"></telerik:ResourceType>
                </ResourceTypes>
                <ResourceStyles>
                    <telerik:ResourceStyleMapping Type="Speaker" Key="1" BackColor="#eb901b"></telerik:ResourceStyleMapping>
                    <telerik:ResourceStyleMapping Type="Speaker" Key="2" BackColor="#8fd21b"></telerik:ResourceStyleMapping>
                    <telerik:ResourceStyleMapping Type="Speaker" Key="3" BackColor="#278ce9"></telerik:ResourceStyleMapping>
                    <telerik:ResourceStyleMapping Type="Speaker" Key="4" BackColor="#f14db2"></telerik:ResourceStyleMapping>
                </ResourceStyles>
                <TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
                <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
            </telerik:RadScheduler>
        </div>
    </telerik:RadAjaxPanel>
    <asp:SqlDataSource ID="SpeakersDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:SQL %>" SelectCommand="SELECT * FROM [user_view]"
        >
    </asp:SqlDataSource>

          <asp:SqlDataSource ID="SpeakersDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:myConnectionString %>" SelectCommand="SELECT * FROM [sp_view]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="EventsDataSource" runat="server"
        ConnectionString="<%$ ConnectionStrings:myConnectionString %>"
        SelectCommand="SELECT * FROM [sp_view]" InsertCommand="INSERT INTO [sp_view] ([Description], [StartTime], [EndTime], [SpeakerID]) VALUES (@Description, @Start, @End, @SpeakerID)"
       UpdateCommand="UPDATE [sp_view] SET [Description] = @Description, [Start] = @Start, [End] = @End, [RoomID] = @RoomID, [RecurrenceRule] = @RecurrenceRule, [RecurrenceParentID] = @RecurrenceParentID, [UserID] = @SpeakerID WHERE [UserID] = @ID"
        DeleteCommand="DELETE FROM [sp_view] WHERE [UserID] = @ID">
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32"></asp:Parameter>
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="Description" Type="String"></asp:Parameter>
            <asp:Parameter Name="Start" Type="DateTime"></asp:Parameter>
            <asp:Parameter Name="End" Type="DateTime"></asp:Parameter>
            <asp:Parameter Name="RoomID" Type="Int32" DefaultValue="1"></asp:Parameter>
            <asp:Parameter Name="RecurrenceRule" Type="String"></asp:Parameter>
            <asp:Parameter Name="RecurrenceParentID" Type="Int32"></asp:Parameter>
            <asp:Parameter Name="SpeakerID" Type="Int32"></asp:Parameter>
            <asp:Parameter Name="ID" Type="Int32"></asp:Parameter>
        </UpdateParameters>
     <InsertParameters>
            <asp:Parameter Name="Description" Type="String"></asp:Parameter>
            <asp:Parameter Name="Start" Type="DateTime"></asp:Parameter>
            <asp:Parameter Name="End" Type="DateTime"></asp:Parameter>
            <asp:Parameter Name="RoomID" Type="Int32" DefaultValue="1"></asp:Parameter>
            <asp:Parameter Name="RecurrenceRule" Type="String"></asp:Parameter>
            <asp:Parameter Name="RecurrenceParentID" Type="Int32"></asp:Parameter>
            <asp:Parameter Name="SpeakerID" Type="Int32"></asp:Parameter>
        </InsertParameters>
    </asp:SqlDataSource>
 

    <div style="display:none">


    <asp:Button ID="Button1" OnClick="Button1_Click"  runat="server" Text="Button" />
            </div>
    
    </form>
</body>
</html>

 

on the code behide 

RadScheduler1_AppointmentDelete(object sender, AppointmentDeleteEventArgs e)
        {

} its not working 

 

Please help us ASAP

 

Regards 

Aakash 

Peter Milchev
Telerik team
 answered on 08 Mar 2018
0 answers
124 views

In a project the telerik ui for asp.net ajax controls are working but when I remove the assemblies for the 2008 version and add references to the 2018 version I only see guarbage like ???????

I also added the resource files to the app_globalresources and app_data and it didn't solve it.

 


Anooshiravan
Top achievements
Rank 1
 asked on 08 Mar 2018
1 answer
153 views

Has anyone come across anything similar to this?

We've got a completely dynamically generated grid, complete with frozen columns and the ability to edit individual specific data fields within a row just by clicking on it.  This all works, just giving you some background.

One of the fields opens a window where you can add/edit/delete records separate to the grid (ie different the cell editing above), however on closing the window the grid updates, refreshing to take into account the newly added/changed record which was saved via the window.  This also works fine in that the grid, even on it being refreshed, maintains its scroll position.

The odd behaviour that we're experiencing is that if at the row you clicked on to open the window is at the bottom for instance, after the window has been closed and the grid refresh (still looks to maintain the scroll position at this point), then clicking on the horizontal scrollbar (either the bar itself or the arrow button) will scroll the grid to the top.  This happens in Chrome, FF or Edge, but does not happen in IE11.

Has anyone experienced anything similar?

Thanks

 

Cheryl
Top achievements
Rank 1
Iron
 answered on 07 Mar 2018
7 answers
442 views

Hi,

When I type any text in the editor without changing the default font style the text doesn't get saved with the font style.

Is there any solution to always save the font style?

Thanks

Rumen
Telerik team
 answered on 07 Mar 2018
3 answers
406 views

     I am trying to remove an appointment from the radscheduler on client side. I have a standard asp button that will fire a javascript function but I'm not sure on the syntax for removing an appointment from the radscheduler. Could I get some guidance. Thanks.

 

function DeleteAnAppointment()
        {
            $("#" + "<%= RadScheduler1.ClientID %>").deleteAppointment(2);
        }
 
<asp:LinkButton runat="server" ID="btnCancelAppointment" CssClass="btn btn-default" OnClientClick="DeleteAnAppointment();">
                        CANCEL
                    </asp:LinkButton>
 
<telerik:RadScheduler ID="RadScheduler1" runat="server"
                        StartInsertingInAdvancedForm="true"
                        EnableDescriptionField="true"
                        OverflowBehavior="Auto"
                        OnClientAppointmentClick="appointmentClick"
                        OnClientAppointmentMoving="appointmentMoving"
                        OnClientFormCreated="formCreated"
                        OnAppointmentClick="RadScheduler1_AppointmentClick"
                        OnAppointmentInsert="RadScheduler1_AppointmentInsert"
                        Height="700px"
                        Width="100%"
                        Skin="Bootstrap"
                        Culture="en-GB"
                        AdvancedForm-Modal="True"
                        MinutesPerRow="15"
                        HoursPanelTimeFormat="hh:mm tt"
                        NumberOfHoveredRows="1"
                        SelectedView="WeekView"
                        OnTimeSlotCreated="RadScheduler1_TimeSlotCreated"
                        AllowEdit="false"
                        AllowInsert="true"
                        AllowDelete="false"
                        AgendaView-UserSelectable="True"
                        TimelineView-UserSelectable="False"
                        Localization-AdvancedDescription="Notes"
                        ShowFooter="False"
                        ShowAllDayRow="False"
                        DayView-UserSelectable="False" OnAppointmentCreated="RadScheduler1_AppointmentCreated" OnDataBound="RadScheduler1_DataBound">
                    <MonthView ReadOnly="True" VisibleAppointmentsPerDay="4" />
                    <AdvancedForm Modal="True" EnableCustomAttributeEditing="true" />
                    <TimelineView UserSelectable="False" />
                    <AgendaView UserSelectable="True" />
                    <AppointmentTemplate>
                        <div style="font-weight:bold;"><%# Eval("ApptClientID") %></div>
                        <div><%# Eval("Title") %> <%# Eval("Surname") %></div>
                    </AppointmentTemplate>
                </telerik:RadScheduler>
Vessy
Telerik team
 answered on 07 Mar 2018
10 answers
420 views
Hello,

I'm using a RadGrid with grouping and hope to customize the PDF export.  

My customer needs additional data in the group headers, so I've customized the RadGrid_ItemDataBound method to apply extensive formatting (see screen shot below).  To achieve this I set the e.Item.DataCell.Text property to a string containing my HTML:

protected void myGrid_ItemDataBound(object sender, GridItemEventArgs e) { 
 
if (e.Item is GridGroupHeaderItem) { 
 
//stylize group header 
GridGroupHeaderItem item = (GridGroupHeaderItem)e.Item; 
 
item.DataCell.Text = "<table><tr><td><b>Custom Group Header</b></td></tr></table>"; 
 
} 
 
} 

This works great in the browser!  However, my custom group header is ignored in the PDF (see other screen shot).  Would someone provide instruction on customizing Group Headers within the PDF export?  

I am familiar with using the myGrid_PdfExporting method to make changes when the PDF is exported.

Thanks much!

Steven
Attila Antal
Telerik team
 answered on 07 Mar 2018
2 answers
605 views

I have a RadCheckBox on my page header:
     <telerik:RadCheckBox ID="rckMeasurables" Text="Show Measurables?" class="Sunset" OnClientCheckedChanged="check_changed" runat="server" />

if the checkbox is checked it should show half a dozen columns on a RadGrid

        <telerik:RadCodeBlock ID="rcBlock" runat="server">
            <script type="text/javascript">
                function check_changed()
                {
                    var rckMeasurables = $find("<%= rckMeasurables.ClientID %>");
                    var theGrid = $find('<%= rgDraftProspects.ClientID %>');
                    var theView = theGrid.get_masterTableView();
                    var theColumns = theView.get_columns();
                    for (var i = 10; i < 18; i++)
                    {
                        // javascript to hide or show columns
                    }

                }
            </script>
        </telerik:RadCodeBlock>

theGrid is null!

the Ajax Manager:

        <telerik:RadAjaxManager ID="raManager" runat="server" >
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="rgDraftProspects">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rgDraftProspects" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="rckMeasurables">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rgDraftProspects" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

 

help!  what am I missing?  the script finds the checkbox but the grid is null
             

Chris
Top achievements
Rank 1
 answered on 07 Mar 2018
0 answers
174 views

I have an ASP.Net page with RadTextboxes.  All the RadTextboxes use Rendermode of Lightweight and use Office2007 skin.

On the ASP.Net page is a RadButton that allows the user to print the panel to a printer.

One of the RadTextboxes for QR Output has a width of 645px.

The problem is no matter what width the RadTextbox for QR Output is that it keeps showing in the printout as the default width for the RadTextbox.

Does not matter what browser is used (IE, Chrome, Firefox).

I need the printout to show the RadTextbox for QR Output as the same width as what the ASP.Net page shows.

Attached is a Screenshot of the ASP.Net and a picture of the printout.

Please help me resolve this.  Thanks!

Sincerely,

Keith Jackson

Keith
Top achievements
Rank 1
 asked on 07 Mar 2018
1 answer
127 views

Hi there,

 I am trying to find the same functionality which is in the following link:

 

https://demos.telerik.com/aspnet-ajax/calendar/server-side-programming/server-side-events/defaultcs.aspx

 

for ASP.NET MVC and the closest I have found is:

https://demos.telerik.com/aspnet-mvc/calendar/selection

 

The issue with this is that I need to keep control key down to select the dates and I can only select by rows and not columns. 

 

I would like to have the exact features as the first link.

 

Could you please point me to the right direction?

 

Thanks,

 

Amir

Viktor Tachev
Telerik team
 answered on 07 Mar 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?