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

I have RadLisBox custom scripts and am putting focus on ClientLoad()

Something like

Function OnClientLoad(sender, eventsArgs)

{

var RadListBox = $find('radlistbox.clientid')

RadListBox.on('focus', function (e) {
                var index = $('#' + e.target.closest("li").id).index();
                var item = radListControl.get_items().getItem(index);
                if (item) {
                    radListControl.clearSelection();
                    radListControl._activateItem(item, true);
                    item.set_selected(true);
                }
            });

}

item.set_selected(true) give me an error on _updatevalidationfield()

Can I override this code somehow?

 

Edit: There is custom validator attached to this. Think the error is coming from it

EDIT2: I think I figured it out (maybe?). The items within the control are disappearing after some time - probably postback event from validator. I had sort of singleton in place cause I did not need to update the instance of the control. After removing it at least at this point it seems ok. 

 

Attila Antal
Telerik team
 answered on 01 Jun 2021
1 answer
464 views

Hi

I am trying to add font icon to radasyncupload but it does not align well. Text and icon are not at same height as shown below.

As shown above,

the "Download Template" is a radbutton control with markup as   <telerik:RadButton runat="server" ID="rbDownloadTemplate" Text="Download Template"
                    k" RenderMode="Lightweight">
                    <Icon PrimaryIconCssClass="rbDownload"></Icon>
                </telerik:RadButton>

the "Upload data" is a radasyncupload control with markup as    <telerik:RadAsyncUpload RenderMode="Lightweight" runat="server" ID="rauUploadFile" ClientIDMode="Static"
                    MaxFileInputsCount="1" MultipleFileSelection="Disabled" DropZones=".DropZone1"
                    AllowedFileExtensions="xls,xlsx,csv"
                    OnFileUploaded="rauUploadFile_FileUploaded"
                    OnClientFileUploaded="rauUploadFile_OnClientFileUploaded"
                    OnClientValidationFailed="rauGeneric_OnClientValidationFailed" HideFileInput="true" CssClass="uploadButton" AriaSettings-Label="lbl">
                    <Localization Select="Upload data" />
                    <FileFilters>
                        <telerik:FileFilter Extensions="xls,xlsx,csv" />
                    </FileFilters>
                </telerik:RadAsyncUpload>

and my custom css to hide upload input and other settings

.ruBrowse::before {
    content: "\e133" !important;
    font: 16px/1 "WebComponentsIcons" !important;
}

.uploadButton {
    display: inline !important;
    position: relative !important;
}

    .uploadButton ul {
        display: inline !important;
    }

div.RadUpload .ruFakeInput {
    visibility: hidden !important;
    width: 0px !important;
    padding: 0px !important;
}

Can you please help in adding the font icon to asyncupload and look same as radbutton font icon

 

Thank you.


Attila Antal
Telerik team
 answered on 31 May 2021
1 answer
362 views

Hi there,

Is there any way to obtain the list of the columns and the visibility from the first control below the columns label? 

 

Regards,

Alvaro.

 

Doncho
Telerik team
 answered on 31 May 2021
2 answers
211 views

After update to 2021.2.511 the font in all windows of the editor are serif instead of Segoe.

Please refer to attached screenshots.

Any idea why this could be happening?

 

Thanks,

Marc

Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 31 May 2021
3 answers
211 views

I have this code that only allows the user to type a single word. Therefore the blank space (32) is taken as the end of the word.

I can GET the typed text and trim it this way:

var typed = $find('<%= RadAutoCompleteBox1.ClientID %>').get_inputElement().value.trim();

So if the client type "mytext   " it will be converted to "mytext"

Now I need to know how to replace what user typed back with the trimmed text.

Thanks in advance!

Yan Moura
Top achievements
Rank 1
Veteran
Iron
 answered on 29 May 2021
1 answer
220 views

Hello,

I'd like to know how to clear items and force close dropdown in AutoCompleteBox from client side (Javascript)...

Thanks!

Yan Moura
Top achievements
Rank 1
Veteran
Iron
 answered on 29 May 2021
1 answer
349 views

How to set focus to AutoCompleteBox?

I tried the following but it doesn't work:

var autoComplete = $find("<%= RadAutoCompleteBox1.ClientID %>");
autoComplete.focus();

Error: autoComplete.focus is not a function

Yan Moura
Top achievements
Rank 1
Veteran
Iron
 answered on 29 May 2021
1 answer
133 views

Hi there, 

I would like to know how to avoid the elements in the groupPanel overlap between them.

Right now I have the name of the column and the arrow button in the same place.

dds
Top achievements
Rank 1
Iron
Iron
 answered on 27 May 2021
0 answers
196 views

Hi!

I am using AutoCompleteBox and I would like to know how to get the very first value of the dropdown list (client side) with Javascript.

Thanks!

 

EDIT: I figured how to do this using the event dropDownItemDataBound in case someone else needs it:

        

var typed = ""; var current = ""; function requesting(sender, eventArgs) { var acbox = $find('<%= RadAutoCompleteBox1.ClientID %>'); var acboxcontents = acbox.get_inputElement(); typed = acboxcontents.value; } function dropDownItemDataBound(sender, args) { if (current != typed) { if (typed.substr(typed.length-1, 1) == " ") { var acbox = $find("<%= RadAutoCompleteBox1.ClientID %>"); var newEntry = acbox.createEntry(args.get_item().get_text(), args.get_item().get_text()); var entries = acbox.get_entries(); entries.add(newEntry); current = typed; typed = "";
} } }

Right after the client types a blank space (for instances "mysearch ") the code above gets the first value of the dropdown list, converts it into a token, ignores all the rest of the values in the list and clear up the typed string.

Now I just need to know how to set focus back to AutoCompleteBox... Telerik controls are like puzzles and everything is so hard to achieve. :(

Yan Moura
Top achievements
Rank 1
Veteran
Iron
 updated question on 27 May 2021
1 answer
215 views

Hi there, 

I would like to modify the style of the Group Panel border from a grid,  when the mouse is over the control but I think there is not an event that I can link for this.  Let me know if you have any tip 

 

Peter Milchev
Telerik team
 answered on 27 May 2021
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?