Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
766 views
I have a checkbox column that is bound to a datasource, everything works fine on edit, but if I "insert" a new record, I want the checkbox to defualt as checked = true. Is there a way to do this?
If I create a template column, I have to bind the checkbox control in the edit item template and the item template part, but on insert, I want it to default it to checked, I guess unbound?. Is there a way?
Thanks
SMc
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 27 Jun 2022
0 answers
499 views

Hi Evebody

I use RadImageEditor for editing images. I can successfully update images; but I can't get the drawings that I have updated, for example, that I have made on it. The unchanged image comes back. I do this on the server side. I am using the following code. How can I get the currently edited and changed image from RadImageEditor? This code is not working. Thank you very much in advance.

EditableImage tmpImg = rieEditImage.GetEditableImage().Clone();
A
Top achievements
Rank 1
 asked on 25 Jun 2022
1 answer
203 views
I have a grid that is very wide, so it has a horizontal scroll bar.  The grid has a NestedViewTemplate to display these wide rows in one screen frame.  Because I don't know the size of my users screens, I try my best to use % for the height and width.  This has been a source of angst, but that's an issue for another time. I'm using a table to display the data in my NestedViewTemplate.  My question is, why is the width % based on the width of the grid and not the size of the screen?  In order to get the view I'm looking for I have to set my detail table width to 25%.  It wouldn't be an issue if we had the option to display the NestedViewTemplate in a popup.  
Peter Milchev
Telerik team
 answered on 22 Jun 2022
0 answers
170 views

Current Version - 2021.3.915.45 and .NET 4.8

Tried with ContentAreaMode="DIV",but still no luck.

In Edge and chrome ,RadEditor is not maximizing or fit to page.

But ,IE it works fine.

<Telerik:RadEditor runat="server" SkinID="FormBuilder"
    Skin="Default"
    EnableEmbeddedScripts="true"
    EnableEmbeddedSkins="true"
    EnableAjaxSkinRendering="true"
    Height="390px"                                             - tried increase and decrease
    Width="99%"                                                  - - tried increase and decrease
	EditModes="Design,Html"
    AutoResizeHeight="false"                               - Tried with true
    EnableResize="false"
    NewLineBr="true"
    RegisterWithScriptManager="true"
    StripFormattingOptions="MSWord"  
    ToolbarMode = "Default"
    ToolsFile="~/RadControls/Editor/ToolsFile.xml"
	DialogHandlerUrl="~/Telerik.Web.UI.DialogHandler.axd"/>


Can anyone please help me out to fix this issue?

Sachita
Top achievements
Rank 1
Iron
Iron
Iron
 updated question on 22 Jun 2022
0 answers
194 views

This isn't an actual problem, but more of a curiosity.  Why does something called the RadMonthYearPicker still render a full date and time?  I thought that's what the RadDatePicker was for?  It should just give me the Month and Year and no date...which is what it's name would lead you to believe is all that would be involved.  I'm not choosing June 1st 2022.  I'm choosing June 2022.  I understand that I can format the selected date...that's not the point. 

Things that make you go hummmmm. 

SSirica
Top achievements
Rank 3
Iron
Iron
Iron
 asked on 21 Jun 2022
4 answers
332 views

Hi,

 

I'm using the RadAutoCompleteBox in one of our web forms and I'm having an issues with it on Microsoft Edge Mobile.

As it has problems with my OnClientLoad js function and only if I remove the OnClientLoad="OnClientLoad" binding from the control declaration the autocomplete will work.

In the desktop version of edge all is well same for chrome and chrome mobile,

the error:

 

"OnClientLoad is not defined"

"ReferenceError: OnClientLoad is not defined at Array.<anonymous> (https://my-domain.com/syllabisearch/he/pages/default.aspx:272:176322) at https://my-domain.com/syllabisearch/Scripts/WebForms/MsAjax/MicrosoftAjax.js:6:51370 at Sys._Application._raiseInit (https://my-domain.com/syllabisearch/Scripts/WebForms/MsAjax/MicrosoftAjax.js:6:72276) at Sys._Application.initialize (https://my-domain.com/syllabisearch/Scripts/WebForms/MsAjax/MicrosoftAjax.js:6:69772) at b (https://my-domain.com/syllabisearch/Scripts/WebForms/MsAjax/MicrosoftAjax.js:6:71512) at HTMLDocument.a (https://my-domain.com/syllabisearch/Scripts/WebForms/MsAjax/MicrosoftAjax.js:6:71786)"
and the breakpoint is on the following code (attached in 'code-snippet-1.zip').

Here is my  OnClientLoad JavaScript Function

01.function OnClientLoad(sender, args) {
02.                $(".racToken").attr('tabindex', 0);
03.                var autoCompleteBox = $find("<%= RadAutoCompleteSearchBox.ClientID %>");
04.                var entryGeneralTitle = '<%=Idc.Yedion.SyllabiSearch.Helpers.Util.getLocalizedValue("AccessibilityGeneralSearchAutoCompleteBoxClear", CurrentLanguage)%>';
05.                var selectedEntryTitle = entryGeneralTitle.replace('{0}', autoCompleteBox.get_entries()?.getEntry(0)?.get_text());
06.                $(".racRemoveTokenLink").attr('title', selectedEntryTitle);
07.                $(".racToken").attr('title', selectedEntryTitle);
08.                $(".racRemoveTokenLink").attr('aria-label', selectedEntryTitle);
09.                $(".racToken").attr('aria-label', selectedEntryTitle);
10.                $(".racToken").on('keypress', function (e) {
11.                    var key = e.which;
12.                    if (key == 13) {
13.                        e.preventDefault();
14.                        autoCompleteBox.get_entries().clear();
15.                        $("#<%= BtnClearSearch.ClientID %>").click();
16.                    }
17. 
18.                });
19.                $(".racToken").on('keydown', function (e) {
20.                    var key = e.which;
21.                    if (key == 8 || key == 46) {
22.                        e.preventDefault();
23.                        autoCompleteBox.get_entries().clear();
24.                        $("#<%= BtnClearSearch.ClientID %>").click();
25.                }               
26.            });
27.                $telerik.$(sender.get_inputElement()).on('keypress', function (e) {
28.                    if (sender.get_entries().get_count() > 0) {
29.                        e.preventDefault();
30.                    }
31.                });
32.

             

33.            }

 

And this is my control declaration

1.<telerik:RadAutoCompleteBox ID="RadAutoCompleteSearchBox" AllowCustomEntry="false" EnableAriaSupport="true" InputType="Token" ItemType="Idc.Yedion.Internet.ObjectsModels.GeneralSearchResult" runat="server" MinFilterLength="2" TextSettings-SelectionMode="Single" TokensSettings-AllowTokenEditing="false" OnClientLoad="OnClientLoad" DropDownPosition="Static" RenderMode="Lightweight" EnableScreenBoundaryDetection="true" EnableDirectionDetection="true" ZIndex="1" OnEntryAdded="RadAutoCompleteSearchBox_EntryAdded" OnEntryRemoved="RadAutoCompleteSearchBox_EntryRemoved" EnableClientFiltering="true" Skin="Bootstrap" Width="100%"></telerik:RadAutoCompleteBox>

 

Please advice,

Thanks,

Hagai.

Atanas
Telerik team
 updated answer on 21 Jun 2022
1 answer
191 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
303 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
139 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
469 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?