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

Due to our company policy, we had to update Telerik DLLs. 
We jumped directly from v2012.1.411.40 to v2017.3.913.40 on a huge old project. 

While testing that everything was more or less working, I noticed that RadComboBox control stopped to auto-adjust its height while is being filtered with custom text. 

I had an in-depth look at the .js code utilized by the combo in  v2012.1.411.40 in order to understand how it was working, and I noticed that the combo firstly is being filtered by the function 'RadComboBox.prototype.highlightAllMatches'  and then its height is manipulated based on how many items are displayed.  

Looking into the latest version js code, I noticed that while the procedure is more or less the same, the function highlightAllMatches will be applied asynchronously, as you can see in line 26 of the following code.

 

This causes that the function that adjusts height based on the items runs before of the filtering, resulting in a wrong height. 

 

To overcome this problem I've basically overridden the v2017 highlightAllMatches  with the v2012 one, and everything started working as intended.


Despite the workaround passed all tests,
I would know if there is a more elegant way to solve this problem.

01.var a = Telerik.Web.UI;
02.a.RadComboBox.prototype.highlightAllMatches = function(f) {
03.    if (this.get_filter() == a.RadComboBoxFilter.None) {
04.        return;
05.    }
06.    if (this.get_highlightedItem()) {
07.        this.get_highlightedItem().unHighlight();
08.    }
09.    var d = this.getLastWord(f, this._getTrimStartingSpaces());
10.    if (this._getLastSeparator(f) == f.charAt(f.length - 1)) {
11.        this._removeEmTagsFromAllItems();
12.        this.setAllItemsVisible(true);
13.        return;
14.    }
15.    var c = this.get_filter()
16.      , b = function(h, g, i) {
17.        var j = h.highlightText(g, i);
18.        h.set_visible(j);
19.    }
20.      , e = function() {
21.        if (this.get_markFirstMatch()) {
22.            this.highlightFirstVisibleEnabledItem();
23.        }
24.        this._resizeDropDown();
25.    };
26.    this._process(0, c, d, b, e);
27.}
28.;
I've provided some screenshot as an example, I hope that it will be clear. 
thank you

Lorenzo
Top achievements
Rank 1
 asked on 11 Jan 2018
5 answers
592 views
I'm working on multi-language web application where one of the languages is simplified chinese.  I'm using custom paging, which in turn means I have to handle custom filtering as well, which is major PITA.

ORM I'm using doesn't support LINQ.  So I came up with a plan to simply use contents of FilterExpression as part of the sql to retrieve data from database.

Problem is datetime format for simplified chinese looks like yyyyå¹´M月dæ—¥.  Say user selects 25 Jul 2013 in GridDateTimeColumn filter, then FilterExpression becomes ([LastUpdateDate] >= '2013å¹´7月25æ—¥ 0:00:00'), which sql server doesn't recognise at all.  I tried changing FilterDateFormat, but that defines how date is displayed in the filter.

Funny thing is default filtering works ok, but of course it doesn't work with custom paging.  Is there any way to customise datetime format in FilterExpression?
Pierre-Yves
Top achievements
Rank 1
 answered on 11 Jan 2018
7 answers
1.8K+ views
OK I admit not a big deal here but the users are asking if I could change the text on a RadGrid "Add neew record" to Add New Lender" or whatever. I am not seeing right off where to do so but I also frequently get lost in the sun-sub levels of the RadGrid.


TIA
JB
Franklin
Top achievements
Rank 1
 answered on 11 Jan 2018
1 answer
126 views
Can radrotator randomize the order of the pictures to display?
Marin Bratanov
Telerik team
 answered on 11 Jan 2018
0 answers
83 views

I have application that deploy in 2 server.. When i want to download same file with client export manager.. They give different file size.. The first server give me 11.2 mb and the second give me 3.9 mb...

Why it make different file size?

Badar
Top achievements
Rank 1
 asked on 11 Jan 2018
0 answers
80 views

I want to use Toggle radio button in rad grid and want to bind it with data coming from server.

Please share the demo of it.

Yash
Top achievements
Rank 1
 asked on 11 Jan 2018
2 answers
277 views

I'm always skeptical about security updates as more often than not, it breaks my stuff. Here's another example. I installed the above patch and now I'm getting "Error Creating Control" and "Failed to create designer 'Telerik.Web.UI.RadScriptManager.." etc for several of my Telerik controls.

Can someone please point me to a fix for this?

Thanks

 

 

Taurean
Top achievements
Rank 1
 answered on 10 Jan 2018
0 answers
136 views
Hello,

I'm trying to load a pie chart from a datatable dynamically.

I created a new ChartSeries and added it to the chart.

I have the following columns: Total and Account

The total column I am loading as follows:

Serie.DataYColumn = "Total"
Series.DefaultLabelValue = "#% {# 0. ##%}"
Serie.Type = Foot

: I would now like to display the values of the Account column in the caption

series.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels

How do I display the Account column in the Legend?

From now on,

Automatic translation
Fábio
Top achievements
Rank 1
Iron
 asked on 10 Jan 2018
0 answers
139 views

Hi,

I am adding the series to the chart, when the percentage presents the value 8.99% is ok, but when the value is 11.70% it presents only 11.7.

I am using the code:
series.DefaultLabelValue = "#% {# 0. ##%}"

From now on,

Automatic translation

Fábio
Top achievements
Rank 1
Iron
 asked on 10 Jan 2018
1 answer
772 views

I have a RadGrid set for Batch Editing and I have half of the columns as Read Only and the ones that are editable are all check boxes (Months of the Year). I want to be able to insert a new record and be able to insert some information in the columns that are Read Only during the edit.  I've tried a few different things and it seems like its all or nothing.  If I have the column set as Read Only then even when I click to insert a new record it won't allow anything.  And if I don't have the column set to Read Only, even though I have my RadComboBox in the <InsertItemTemplate> section of GridTemplateColumn, it allows me to edit existing rows.

What would be the best way to be able to accomplish this?

 

Any help is appreciated..

 

Marin Bratanov
Telerik team
 answered on 10 Jan 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?