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

I was trying to display some report data using Kendo grid and I’m getting uncaught errors kendo.syncReady. is not a function. Is this a new function added in any recent version of KendoUI?

 

Regards

 

Medhanie
Top achievements
Rank 1
Veteran
 answered on 30 Mar 2020
3 answers
100 views
Hi, guys,

I have a big problem.
I use the DatePicker.
When I use the DateInput parameter, or when I add it, I have the following problem.

The DatePicker shows me 2 buttons to select the date.
The first one works fine, the second one does not react but is displayed.
I have attached a picture to the thread.

Does anybody have an idea what it could be?

Thanks in advance for your help.
Denitsa
Telerik team
 answered on 30 Mar 2020
3 answers
149 views

I have a large existing ASP.NET MVC project where I want to introduce Telerik gradually. I have separate layout files for pages that should use Telerik and pages that do not. Some fields that do not use the Telerik included layout page are still getting the kendo styling.

Example:

I have a login page. Password field should use bootstrap styling.

@Html.EditorFor(model => model.Password, new { htmlAttributes = new { @class = "form-control" } })

 

Field settings from view model:

[DisplayName("Password")]
[DataType(DataType.Password)]
public string Password { get; set; }

 

When I load the page the field gets kendo styling. How do I prevent this?

<input class="k-textbox" id="Password" name="Password" type="password" value="" />
Aleksandar
Telerik team
 answered on 30 Mar 2020
11 answers
113 views

Hi I have a grid with a edit pop up.All works as expected till the user puts a script in the edit fields.On lose focus this executes the script for some reason.I have even written my own custom validation which removes this from the field but when the validator returns it executes the payload(kk</script><img src=1 onerror='alert(223)'/>).What happens in the background of the editor on focus out because my validator changes do not make a difference

 

Any help would be greatly appreciated as I have tried everything but the alert still appears..Even when the text has been removed from the textfield

Ethan
Top achievements
Rank 1
 answered on 30 Mar 2020
6 answers
1.5K+ views
I have a question. I have a rather large dataset (~ 1M records) containing track and trace log messages. The average number of messages per T&T code lies around 20 records. I have a page on which these log messages for a specified T&T code are displayed using a Kendo MVC Grid, without pagination (and no pagination is intended here). As the table is getting bigger, the web app response becomes slower and slower.

I have done some profiling, and it turns out that the Json(result.ToDataSourceResult(request)) invocation in the Get ActionResult produces two queries. The first one is a (very slow, ~ 18 s) query which seems to take care of the 'Total'-property in the DataSource result. The second one is a much faster (~ 150 ms) query getting the actual records.

Since we don't need pagination on this specific grid, I don't really understand why the total count is needed anyway. Can't Kendo be smart enough to skip getting the total count when we don't need it?

I have searched the internet, and it seems like there are more people experiencing the same thing: http://stackoverflow.com/questions/15843703/kendo-mvc-todatasourceresult-extremly-slow-with-large-iqueryable
The reactions there suggest to create a custom binding, but I would really prefer not to enter that path..

Is there a solution for this?
Tsvetomir
Telerik team
 answered on 30 Mar 2020
6 answers
828 views

I have kendo mvc grid with inline edition. I want to edit my values in grid but when i click on combobox value and change it. It's not changing row value return old existing value
How can i solve this?
Here my grid and Templates

@(Html.Kendo().Grid<MockUpForeNet.Controllers.CardDetailController.Limits>()
        .Name("limitgrid").AutoBind(true)
        .DataSource(dataBinding => dataBinding.Ajax()
        .Read("GridLimitBinding", "CardDetail",new { rule = rule }).Update("UpdateLimit", "Transaction")
        .Model(keys =>
        {
            keys.Id(c => c.Id);
            keys.Field(c => c.Id).Editable(false);
            keys.Field("DurationType", typeof(string)).Editable(true);
            keys.Field("DurationValue", typeof(string)).Editable(true);
            keys.Field("ValueType", typeof(string)).Editable(true);
            keys.Field("MaxValue", typeof(string)).Editable(true);
 
        }).Batch(true).ServerOperation(false)
        )
        .Events(e => e.DataBound("hidecolumn1"))
        .Editable(editing => editing.Mode(Kendo.Mvc.UI.GridEditMode.InCell))
        .ToolBar(commands =>
        {
            commands.Create().Text(" ");
            commands.Save().SaveText(" ").CancelText(" ");
        })
        .Columns(columns =>
        {
            columns.Bound(e => e.MaxValue).Width(200).Title("Limit").ClientTemplate("#= ValueType == 'Amount' ? Row(MaxValue) : RowLiters(MaxValue) #");
            columns.Bound(e => e.ValueType).Width(200).Title("Type").EditorTemplateName("ValueType");
            columns.Bound(e => e.DurationValue).Width(200).Title("Duration");
            columns.Bound(e => e.DurationType).Width(200).Title("Duration Type").EditorTemplateName("DurationType");
            columns.Bound(e => e.Id).Visible(false);
            columns.Bound(e => e.Id).Width(80).ClientTemplate("<img src='../../assets/images/icons/delete.svg' id='#=Id#' />").Filterable(false).IncludeInMenu(false).Title(" ");
        })
        //.Selectable()
        .Sortable()
        .Navigatable(configurator => configurator.Enabled(true))
 
 
 
         ///My editor templates
          @(Html.Kendo().ComboBox()
                .Name("cbvaltype")
                .Items(i =>
                {
                    i.Add().Text("Quantity").Value("Quantity");
                    i.Add().Text("Amount").Value("Amount");
                })
            )
 
            @(Html.Kendo().ComboBox()
                    .Name("cmbdurationtype")
                    .Items(i =>
                        {
                        i.Add().Text("Hour").Value("Hour");
                        i.Add().Text("Day").Value("Day");
                        i.Add().Text("Week").Value("Week");
                        i.Add().Text("Month").Value("Month");
                        i.Add().Text("Year").Value("Year");
                    })
              )
Adil
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 30 Mar 2020
2 answers
506 views
I'm having an issue with grids when I re-size the columns. If my grids have 4 or fewer columns they jump to a much larger size when you try to re-size them. This also causes the grid before them to shrink. I'm wondering if this is a column width issue or something I might be missing.

 @(Html.Kendo().Grid<DST.DTOs.CoreDTO.ClassificationTypeViewModel>()
                      .Name("ClassificationTypeGrid")
                      .ToolBar(toolBar => toolBar.Template("<a class='btn btn-primary' title='Create New' onclick='classCreateItem()' href='#'>Create Classification Type</a>"))
                      .HtmlAttributes(new { style = "height:90%" })
                      .Columns(columns =>
                      {
                          columns.Bound(p => p.Id)
                              .Width(20)
                              .Filterable(false)
                              .Sortable(false)
                              .Title("Actions")
                              .IncludeInMenu(false)
                              .ClientTemplate("<a href=\"javascript: void(0);\" onclick=\"classEditItem('#: Id #');\" title=\"Edit\"><i class=\"fa fa-pencil-square-o fa-lg\"></i>     <span class=\"sr-only\"></span></a>" +
                                              " " +
                                              "# if (timesUsed == 0) { #" +
                                              "<a href=\"javascript: void(0);\" onclick=\"confirmDeleteType('#: Id #'" + "," + "'#: Title #');\" title=\"Delete\"><i class=\"fa fa-trash-o fa-lg\"></i><span class=\"sr-only\"></span></a>" +
                                              "# } else if (timesUsed > 0) { #" +
                                              "<i class=\"fa fa-trash-o fa-lg\" title=\"Classification Type is assigned to a group\"></i>" +
                                              "# } #");
                          columns.Bound(p => p.Title)
                              .Width(100)
                              .Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
                          columns.Bound(p => p.ProtectionLevel)
                              .Width(100)
                              .Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
                      })
                      .Pageable(page => page
                          .Refresh(true)
                          .PageSizes(true))
                      .Sortable(sort => sort
                          .SortMode(GridSortMode.MultipleColumn))
                      .Scrollable(o => o.Height("100%"))
                      .Filterable(filter => filter.Mode(GridFilterMode.Row))
                      .ColumnMenu()
                      .Resizable(resizable => resizable.Columns(true))
                      .DataSource(data => data
                          .Ajax()
                          .Read("GetClassifications", "Classifications")
                      )
            )
durby
Top achievements
Rank 1
 answered on 28 Mar 2020
1 answer
126 views
We have around 15 rooms in our building and we are using the Scheduler to show the room bookings. I'm using the resources feature to group by RoomID and show the calendar by Room. It works fine and displays correctly in the Day view but since there are 15 rooms, the week/month views are cramped so I was wondering if I can use the resources feature and grouping for the Day view and remove them for the Week/Month views. Is that possible? 
 
@(Html.Kendo().Scheduler<SchedulerViewModel>()
          .Name("Scheduler")
          .Date(DateTime.Today)
          .AllDaySlot(true)
          .Group(g => g.Resources("RoomID").Date(true))
          .Editable(w => w.Update(false).Create(false).Destroy(false))
          .Views(views =>
          {
              views.DayView(weekView => weekView.StartTime(06, 00, 00).EndTime(19, 00, 00).Selected(true));
              views.WeekView(weekView => weekView.StartTime(06, 00, 00).EndTime(19, 00, 00));
          })
          .AutoBind(false)
          .Resources(resource =>
          {
              resource.Add(m => m.RoomID)
              .DataTextField("Text")
              .DataValueField("Value")
            .DataSource(d => d.Read(read => read.Action("GetRooms", "DataSource")));
          })
          .DataSource(d => d
              .Model(m =>
              {
                  m.Id(f => f.RoomID);
                  m.Id(f => f.Id);
                  m.Field(f => f.Start);
                  m.Field(f => f.End);
              })
              .Read(read =>
              read.Action("GetCalendarSchedule", "DataSource")
              )
          ))
)
Dimitar
Telerik team
 answered on 27 Mar 2020
1 answer
322 views

I am asking if there is a tool for word processing files like word , i know that the default editor has many text manipulation options but i want the microsoft word interface with its tabs and page interface, with its ruler and so .
these are the main functionalities that i want to check if they are found in UI for ASP.Net MVC:

1- insert photo
2- modify margin
3- modify header and footer
4- word alike

5-insert file

thanks

Petar
Telerik team
 answered on 27 Mar 2020
1 answer
311 views

have a simple grid that when I export to PDF the filter ros andboxes are on the PDF,    How do I exclude these from the PDF document.

This is a MVC web app.

 

Thanks in advance

 

@(Html.Kendo().Grid< ShitTruckLibrary.Models.Contact>()
        .Name("WorkGrid")
          .ToolBar(tools => tools.Pdf())
        .Pdf(pdf => pdf
            .AllPages()
            .AvoidLinks()
            .PaperSize("A4")
            .Scale(0.8)
            .Margin("2cm", "1cm", "1cm", "1cm")
            .Landscape()
            .RepeatHeaders()
            .TemplateId("page-template")
            .FileName("Kendo UI Grid Export.pdf")
            .ProxyURL(Url.Action("Pdf_Export_Save", "Grid"))
            
        )
        .Columns(columns =>
        {
            columns.Bound(c => c.id).Hidden();
            columns.Bound(c => c.ForeName).Title("Forename").Filterable(ftb => ftb.Cell(cell => cell.ShowOperators(false)));
            columns.Bound(c => c.SurName).Title("Surname").Filterable(ftb => ftb.Cell(cell => cell.ShowOperators(false)));
            columns.Bound(c => c.CompanyName).Title("Customer").Filterable(ftb => ftb.Cell(cell => cell.ShowOperators(false)));
            columns.Bound(c => c.Address1).Title("Address 1").Filterable(ftb => ftb.Cell(cell => cell.ShowOperators(false)));
            columns.Bound(c => c.Address2).Title("Address 2").Filterable(ftb => ftb.Cell(cell => cell.ShowOperators(false)));
            columns.Bound(c => c.Phone1).Title("Phone 1");
            columns.Bound(c => c.Phone2).Title("Phone 2");
        })


        .HtmlAttributes(new { style = "height: 50vh;" })
        .Scrollable()
        .Filterable(ftb => ftb.Mode(GridFilterMode.Row))
        .Sortable()
        .Pageable(pageable => pageable
        .Refresh(true)
        .PageSizes(true)
        .ButtonCount(5))

        .DataSource(dataSource => dataSource
                .Custom()

                .PageSize(50)
                .Transport(transport =>
                {

                    transport.Read(read => read.Url("getwork").Data("getSearch").Type(HttpVerbs.Get));
                })
            )


        )

 

Petar
Telerik team
 answered on 26 Mar 2020
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
Licensing
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
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
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
AICodingAssistant
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?