Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
232 views
How can I pop up a custom list of available tasks that a user is allowed to add to the gantt chart.  Preferably a different list depending on the level they are adding the child to.  Any examples of this concept would be great!
Peter Milchev
Telerik team
 answered on 28 Jun 2022
1 answer
231 views

I have added a custom button in place of the "Add Task" but can't seem to figure out how I can find the selected task from the gantt chart in javascript.  I am trying to force a popup so that the user can only select from a list of items to add as a task, depending on level they are selecting.  Any samples or ideas would be great.

Thanks!

Peter Milchev
Telerik team
 answered on 28 Jun 2022
1 answer
417 views

Hi All,
I am stuck while calling javascript function from code behind on OnItemsRequested event. somehow I can call same js from OnTextChanged event.
b

below is my code please help-

asp.net -

<telerik:RadComboBox ID="ddl1" runat="server" Height="150" OnClientItemsRequesting="OnClientRequestingAC" OnItemsRequested="ddl1_ItemRequested" EmptyMessage="" EnableLoadOnDemand="true" ShowMoreResultsBox="false" EnableVirtualScrolling="false" AutoPostBack="true" MarkFirstMatch="false" ShowDropDownOnTextboxClick="false" Style="width: 200px; height: 20px !important;" MinFilterLength="3" ForeColor="Black" ShowToggleImage="true" ToolTip="Search by inputing number. Press Enter to select." LoadingMessage="Loading matching records..." OnClientItemsRequestFailed="OnClientACRequestFailedHandler" OnTextChanged="ddl1_TextChanged" OnSelectedIndexChanged="ddl1_SelectedIndexChanged" onkeyup="return CallMethod(event,this.id);">

in server side code-

Protected Sub ddl1_ItemRequested(sender As Object, e As RadComboBoxItemsRequestedEventArgs)
 
'' Doing some data fetching and JSON request preparation here...

      System.Web.UI.ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "SearchRequestedJS", "GetSearchQueryData('" + JSONrequest + "');", True)

Catch ex As Exception
End Try
    End Sub
Peter Milchev
Telerik team
 answered on 28 Jun 2022
8 answers
703 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
451 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
159 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
137 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
144 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
286 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
152 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?