Telerik Forums
UI for ASP.NET MVC Forum
2 answers
145 views

Hi,

in our company we are testing migration Migration Telerik ASP.NET MVC from 2016.3.1028.545 to 2022.1.119.545.

Our app now is working with .NET 4.8.

We have upgrade all microsoft asp.net mvc references to make compatibles with new teleric dll.

We have migrated dll through upgrade wizard (Api Analyzer didnt work, when we have select all selection it began to run and swicht off)

We have changed all scripts, styles manually.

We have changed file kendo-ui.d.ts for kendo.all.d.ts manually

then when we have compiled app we get an error :

Error	TS2339	(TS) Property '_decorateMessageContainer' does not exist on type 'Validator'.	

It seems that in kendo.all.d.ts , in Validator doesnt exists property '_decorateMessageContainer' anymore, so our function doesn't work:


function addValidationEvent() {
    var oDecorateMessageContainer = kendo.ui.Validator.fn._decorateMessageContainer;
    kendo.ui.Validator.fn._decorateMessageContainer = function () {
        $('[name="' + arguments[1] + '"]').trigger("validation-error");
        return oDecorateMessageContainer.apply(this, arguments);
    };

    var oValidateInput = kendo.ui.Validator.fn.validateInput;
    kendo.ui.Validator.fn.validateInput = function () {
        arguments[0].trigger("validation-check");

        return oValidateInput.apply(this, arguments);
    };
}

Id like to know :

1º) Can we upgrade directly from 2016 Telerik version to 2022 or we have to upgrade first to another version.

2º) Is version 2022 the better version for our app or is better another earlier one ?

3º) How can i fix the error explained below?

 

Thanks in advance.

Mariano
Top achievements
Rank 1
Iron
 answered on 22 Feb 2022
3 answers
171 views

 again >>
I can't restore the kendo on mu new laptop,

I mapped my project and it required to restore the kendo , but it appear this message !
any help ? 

 

 
Wafaa
Top achievements
Rank 1
Iron
 answered on 20 Feb 2022
1 answer
127 views

I'm trying to use the Kendo UI Breadcrumb component.  I have it set up like so:

 

            @(Html.Kendo().Breadcrumb()
            .Name("breadcrumb")
            .BindToLocation(true)
            .Navigational(true)
            )

 

This works fine, except when routing to a page multiple levels down in my web app.  For example, my project structure is:

Pages/Index.cshtml
Pages/Core/Page2.cshtml

So Pages/Index.cshtml  shows just the Home icon.  Great.

But pages/Core/Page2.cshtml shows this in the breadcrumbs:  HomeIcon > > Page2  instead of HomeIcon > Page2

How do I make the breadcrumb not display that blank space where a folder isas part of the path?  I don't want to hard code the breadcrumbs -- that sort of defeats the purpose. 

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 18 Feb 2022
0 answers
128 views

We're using Telerik.UI.for.AspNet.Mvc5.2021.2.511 to input 2 dates.

var culture = System.Globalization.CultureInfo.CurrentCulture.ToString();

<script src="~/Scripts/kendo/2021.2.511/cultures/kendo.culture.@(culture).min.js"></script>

kendo.culture("@culture");


<div class="form-group">
              @Html.LabelFor(m => m.StartDate, new { @class = "col-md-2 control-label" })
             <div class="col-md-10 k-content">
                  @(Html.Kendo().DatePicker()
                        .Name("StartDate")
                       //.Min(DateTime.Today)
                       .Max(new DateTime(2030, 12, 31))
                       .Value(DateTime.Today.AddDays(1))
                      .Events(e => e.Change("startChange"))
                       .Culture(culture)
                  .HtmlAttributes(new { @data_val = "false", validationMessage = @DisplayText.Get("InvalidDateWarning") })
                  )
                </div>
              </div>

             <div class="form-group">
                 @Html.LabelFor(m => m.EndDate, new { @class = "col-md-2 control-label" })
                   <div class="col-md-10 k-content">
                      @(Html.Kendo().DatePicker()
                        .Name("EndDate")
                         .Min(DateTime.Today)
                         .Max(new DateTime(2030, 12, 31))
                        .Value(DateTime.Today.AddDays(1))
                        .Events(e => e.Change("endChange"))
                        .Culture(culture)
                         .HtmlAttributes(new { @data_val = "false", validationMessage = @DisplayText.Get("InvalidDateWarning") })
                   )
                 </div>
              </div>

When this is run locally in VS it works as expected, but once it's published to the server it complains of an invalid date. Using the debug tools in the browser it shows the attached. The Kendo cultures are correct and the input culture is correct and the date value is correct, so I'm at a loss as to what's going wrong.

Originally we were using the suggested Validation framework, but the same scenario was happening, it worked locally but not once published. This happens in both Chrome and Edge.

Has anyone ever experienced this before?

I've tried the same code now against different languages and it seems to be specific to Czech, so far.

It's the spaces.

Telerik, Is this a bug?

Steve
Top achievements
Rank 1
 updated question on 16 Feb 2022
1 answer
307 views

I'm using Kendo UI for aspnet core MVC. And whenever I use the search with a numeric value I get an exception:

Provided expression should have string type (Parameter 'stringExpression')

It works however great with strings. So for example: "test" works but 5 throws an exception.

My search in my grid is configured like this


.Search(s => { 
                    s.Field(c => c.IncidentEvent, "contains"); 
                    s.Field(c => c.CourseNumber, "contains"); 
                    s.Field(c => c.CourseCode, "contains");
                    s.Field(c => c.ActivityType, "contains");
                    s.Field(c => c.SeverityType, "contains");

All my fields are of string type. However I expect kendo grid to be able to parse integers as well when doing a search.

Is there a way around this? How can I get my search to work with numbers as well?


Ivan Danchev
Telerik team
 answered on 15 Feb 2022
1 answer
212 views

I'm trying to use the custom command functionality in the grid component. When giving my custom command a template, the click event isn't triggered. the template is basically just a span so I can use my icon.

If I don't give an onclick event to the span, the click event is never triggered. But if I do give an onclick event it is triggered but I cannot access the dataItem object. So I am not able to retrieve the row data.

 

 

Eyup
Telerik team
 answered on 11 Feb 2022
1 answer
222 views

I am having trouble with font sizing with the UI for Telerik. I posted before about setting font sizes for the datepicker and dropdowns which now work great.

Now I am having trouble setting the font size for the textbox control with floating label.

<div class="demo-section k-content">
    <h4>Set value</h4>
    @(Html.Kendo().TextBox()
        .Name("textbox")
        .Placeholder("Name")
        .Label(label => label
            .Content("Name")
            .Floating(true)
        )
        .HtmlAttributes(new { style = "width: 100%" })
    )

    <style>
        .k-floating-label-container {
            width: 100%;
        }
    </style>
</div>

I have modified CSS but the floating label looks incorrect when font size is adjusted through CSS. I would like size 14px font for both the input text and the floating label. How can I achieve this? Currently increasing the font size of the floating label makes the label not "float" far enough to the top, and obscures the textbox. Any help is appreciated.

Here is some examples of the extremely small text occuring on all UI inputs...

Textbox with filtering:

Datepicker:

This is really becoming a problem.

I still need a fix for the floating textbox, but I am wondering if there is a more universal fix that can be applied in the universal CSS. Please help, this is my only complaint with the UI so far.

I am losing time trying to adjust font sizes.

 

Eyup
Telerik team
 answered on 10 Feb 2022
7 answers
456 views
I need to know how to change the Event Editor title, for example if I am using the scheduler to set appointments not events so I need to change the title of Editor from Event to Appointment, is there a way to perform that?
Samir
Top achievements
Rank 1
Iron
 answered on 10 Feb 2022
1 answer
148 views

 

How to restrict multiple key press events while entering characters in kendo grid auto populate text box
eg. If enter 3 characters in auto populate textbox its is hitting 3 times action method. How to avoid multiple
server action calls. Please find the pseudo code as below :

@(Html.Kendo().Grid<Model>().Name("Grid")
.AutoBind(Model.AutoPopulateResults)
.Columns(columns =>
{
columns.Bound(theMember => theMember.LastName).Width(30).Filterable(ftb => ftb.Cell(cell => cell.Operator("contains").ShowOperators(false).MinLength(3).SuggestionOperator(FilterType.Contains)));
}
.DataSource(dataBinding => dataBinding.Ajax()
.Read(read => read.Action("ActionMethod", "Controller").Data("SearchParameters"))
.Events(events => events.Error("handleAjaxErrorFromGrid"))
.ServerOperation(true)
.Filterable(ftb => ftb.Mode(GridFilterMode.Row))
.Events(events => events.Change("GridRowSelected")
.Filter("GridRowonFiltering"))

 

 

 

Eric
Top achievements
Rank 1
Veteran
Iron
 answered on 09 Feb 2022
1 answer
138 views

Hello,

I currently open up a selected word document which is displayed on the editor and I am able to edit it however I can not save the edited document.

I am using the Kendo Editor Control to edit documents and would like to know if there are any ways to save the text that was edited on the editor ? I could not find any demos on how its done. 

 

Kind Regards 

Anisha

Eyup
Telerik team
 answered on 09 Feb 2022
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
AppBar
BottomNavigation
Card
FloatingActionButton
Licensing
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
DateTimePicker
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?