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

Hi there,

since it is not possible to paste images, if stripping all formatting is configured, i have created a small workaround, which i want to share. Target was, to get pretty clean HTML - without annoying markup - but to allow images to be inserted via clipboard.

First of all, use the options of the editor, to "pre-clean" the HTML:

StripFormattingOptions="Css,Font,Span,MSWordRemoveAll"

Then attach to the OnClientPasteHtml event and perform special cleaning, if HTML is pasted:

function Editor_PasteHtml(sender, args) {
	var sInitialValue = args.get_value();
	if ((args.get_commandName() == 'Paste') && (sInitialValue != null)) {
		// Only allow basic tags
		var sStrippedValue = sInitialValue.replace(new RegExp("<(?!\/?(strong|b|em|img|(i(?!nput))|u|ol|ul|li|p|br)(?=>|\s?.*>))\/?.*?>", "ig"), "");
		args.set_value(sStrippedValue);
	}
}

The solution is not perfect and the RegEx could be extended, but for our case, it works good enought. The RegEx itself was taken from a sample by Rumen and modified, to allow less tags.

 

Kind regards, Carsten

Rumen
Telerik team
 answered on 15 Jun 2021
1 answer
8 views

Hi

I have RadScheduler with timeline as selected view. It works other well but when appointments are first ending and second starting at same time, it make two rows. Is there any possibility to get those to same row (and create second row only when appointments are over each others)? Times are not over to each other so I think those should be in one row and when appointment end and start is exactly same time with slot time period those might be in same row. See picture what my situation is now.

Here is Scheduler aspx snipped (code behind has tooltip generation in OnAppointmentDataBound) which is quite directly from your demo, only datasources and fields from there are changed (and done own styles to try change colors and font).

        <telerik:RadScheduler RenderMode="Lightweight" runat="server" ID="RadScheduler1" SelectedView="TimelineView" 
            SelectedDate="2021-05-01" DayStartTime="00:00:00" DayEndTime="23:59:59" Height="100%" Width="100%" RowHeight="60" 
            DataSourceID="SqlSSAK" DataKeyField="ID" DataSubjectField="NIMIKE" DataStartField="ALKUAIKA" DataEndField="LOPPUAIKA"
            Localization-HeaderMultiDay="Work Week" GroupingDirection="Vertical" GroupBy="SakKoneNimi" 
            OverflowBehavior="Scroll" ShowFullTime="True" StartInsertingInAdvancedForm="True"
            OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" >
            <AdvancedForm Modal="true"></AdvancedForm>    
            <ResourceTypes>
                <telerik:ResourceType KeyField="SakKoneID" Name="SakKoneNimi" TextField="SakKoneNimi" ForeignKeyField="SakKoneID" DataSourceID="sqlSakitysKoneet"></telerik:ResourceType>
            </ResourceTypes>
            <ResourceStyles>
                <telerik:ResourceStyleMapping Type="SakKoneNimi" Text="SSAK1" ApplyCssClass="SSAK1Style"></telerik:ResourceStyleMapping>
                <telerik:ResourceStyleMapping Type="SakKoneNimi" Text="SSAK2" ApplyCssClass="SSAK2Style"></telerik:ResourceStyleMapping>
            </ResourceStyles>
            <TimelineView UserSelectable="false" NumberOfSlots="288" SlotDuration="0.00:15:00" TimeLabelSpan="24" ColumnHeaderDateFormat="dd.MM HH" 
                SortingMode="Global" ShowInsertArea="False" ReadOnly="False"></TimelineView>
            <MultiDayView UserSelectable="false"></MultiDayView>
            <DayView UserSelectable="false"></DayView>
            <WeekView UserSelectable="false"></WeekView>
            <MonthView UserSelectable="false"></MonthView>
            <TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
            <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
        </telerik:RadScheduler>

Regards

Harri

Peter Milchev
Telerik team
 updated answer on 14 Jun 2021
0 answers
13 views

I am using Radlistview control drag and drop functionality. Radlistview items are drag and dropping into Repeater control. this functionality working in chrome older version but not working in latest chrome version. I have verified my code..args.get_destinationElement().id;  method returning repeater id   in older version  but in newer version this method returning Radlistview control id. so destination element id returning wrong in newer version. how to overcome on this issue. please help me on this. please find the below my code. 

function trackDropping(sender, args) {
    debugger;
   var dest = args.get_destinationElement();    
   if (!dest || !dest.id || dest.id.indexOf("TeamLink") < 0) {
       args.set_cancel(true); 
    }

Telerik Web UI ListView Items Drag-and-drop Demo | Telerik UI for ASP.NET AJAX

Narender
Top achievements
Rank 1
Iron
 updated question on 11 Jun 2021
15 answers
55 views

In IE, RadGrid drag-and-drop works properly, but in Chrome it works less than 1/2 the time I try to move rows up/down.
When I set a breakpoint in the RowDrop event (server side), the event fields aren't consistently populated in Chrome.

My browser is not zoomed in or out and it's easy to duplicate with your website's example:
http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/rows/drag-and-drop/defaultcs.aspx

Many people have had issues with this over the years but I cannot find any resolution. Some people pointed to the RadGrid being in a MasterPage or in a UserControl, but none of that should matter.

Can you please provide resolution?

Narender
Top achievements
Rank 1
Iron
 answered on 11 Jun 2021
1 answer
21 views

Hi Team,

I have recently migrated from RadGrid Classic to RadGrid Ajax suite.(R3 2020)

I am getting few errors in the Edge,IE11 and Chrome.

Do we need to replace classic RadControl js files with Ajax Control Suite js files?

Issue are captured in the screenshot.

Can you please suggest me why this issue is happening and how to resolve it?

Attila Antal
Telerik team
 answered on 11 Jun 2021
0 answers
3 views

Hello Telerik team, I have the problem that the pivot grid Olap does not run with more than 13000 records, we try to execute with 10 fields and with 2 measurement fields in total 12, however it keeps loading the page without doing something or sometimes it sends error of time out.

Framework used: ASP.NET Ajax

thank you!!

Any comment or possible solution ?

 

Edgar
Top achievements
Rank 1
 asked on 09 Jun 2021
0 answers
13 views

Hello!

I have added data to my radcombobox but when I open the combobox I can´t see data.

Does anybody has any idea about this?


<telerik:RadComboBox ID="rcbVehicleInfoMake" runat="server" Height="250px" Width="120px" Skin="Simple" EnableLoadOnDemand="True" AllowCustomText="False" ShowMoreResultsBox="True" ItemRequestTimeout="500" HighlightTemplatedItems="True" MarkFirstMatch="True" DropDownWidth="310px" SelectOnTab="True" OffsetX="0" ShowDropDownOnTextboxClick="True" ExternalCallBackPage="../RCBStreamers/VehicleMakes.aspx" OnItemsRequested="rcbVehicleInfoMake_ItemsRequested">
                                                        <HeaderTemplate>
                                                            <table style="width: 300px;">
                                                                <tr>
                                                                    <th style="width: 350px; text-align: left;">
                                                                        Description
                                                                    </th>
                                                                    <th style="width: 50px; text-align: left;">
                                                                        Code
                                                                    </th>
                                                                </tr>
                                                            </table>
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <table style="width: 300px; cursor: pointer;">
                                                                <tr>
                                                                    <td style="width: 350px;">
                                                                        <%#DataBinder.Eval(Container, "Attributes['MakeDesc']")%>
                                                                    </td>
                                                                    <td style="width: 50px;">
                                                                        <%#DataBinder.Eval(Container, "Attributes['MakeCode']")%>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </ItemTemplate>
</telerik:RadComboBox>

Cesar
Top achievements
Rank 1
 updated question on 08 Jun 2021
1 answer
10 views

I have updated my telerik dll to 2021 version and I´m facing some problems with radcombobox. I´m not able to open the items and options arrow disappeared.


<telerik:RadComboBox ID="rcbVehicleInfoMake" runat="server" Height="250px" Width="120px" Skin="WindowsXP" EnableLoadOnDemand="True" AllowCustomText="False" ShowMoreResultsBox="True" ItemRequestTimeout="500" HighlightTemplatedItems="True" MarkFirstMatch="True" DropDownWidth="310px" SelectOnTab="True" OffsetX="0" ShowDropDownOnTextboxClick="True" ExternalCallBackPage="../RCBStreamers/VehicleMakes.aspx">
                                                        <HeaderTemplate>
                                                            <table style="width: 300px;">
                                                                <tr>
                                                                    <th style="width: 350px; text-align: left;">
                                                                        Description
                                                                    </th>
                                                                    <th style="width: 50px; text-align: left;">
                                                                        Code
                                                                    </th>
                                                                </tr>
                                                            </table>
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <table style="width: 300px; cursor: pointer;">
                                                                <tr>
                                                                    <td style="width: 350px;">
                                                                        <%#DataBinder.Eval(Container, "Attributes['MakeDesc']")%>
                                                                    </td>
                                                                    <td style="width: 50px;">
                                                                        <%#DataBinder.Eval(Container, "Attributes['MakeCode']")%>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </ItemTemplate>
</telerik:RadComboBox>

 

Please let me know if you have any clue about this issue.

Vessy
Telerik team
 answered on 08 Jun 2021
1 answer
8 views

Hi, 

I'm trying to create a dynamic ListViewDataGroup with code-behind value for 'groupField', is that possible ?


<telerik:RadListView ID="lv_xxx"
                EnableViewState="false"
                ItemPlaceholderID="itemPlaceHolder"
                OnItemDataBound="lv_xxx_ItemDataBound"
                runat="server"  >

                <LayoutTemplate>
				.....
				</LayoutTemplate>

                <DataGroups > 
                <telerik:ListViewDataGroup GroupField='<%= this.XXX >' DataGroupPlaceholderID="groupPlaceHolder" SortOrder="Ascending"  > 
                        <DataGroupTemplate>
                            <tr>
                                <td>
                                    <%# (Container as RadListViewDataGroupItem).DataGroupKey %>
                                </td>
                            </tr>
                            <asp:PlaceHolder ID="itemPlaceHolder" runat="server"></asp:PlaceHolder>
                        </DataGroupTemplate>
                    </telerik:ListViewDataGroup>
                </DataGroups>

                <EmptyDataTemplate> 
                </EmptyDataTemplate>

                <ItemTemplate>
				......
				/ItemTemplate> 
           </telerik:RadListView> 

 

 

thanks

 
Doncho
Telerik team
 answered on 08 Jun 2021
0 answers
6 views

I have a RadDropDownList with countries ,based a client Event I have a javacript loop selecting the country I want,

I then have an OnselectedIndexchangevent which fires after the JS has selected the country ,however when the event fires it does not retrieve the item that was selected by the JS,(the Js is working correctly).It just returns the first item in the list,

I also tried to store the value of the country in a hidden field which doesn't appear on client side either.

Any solutions would be amazing.

Thank You,

Itamar
Top achievements
Rank 1
 asked on 07 Jun 2021