Telerik Forums
UI for ASP.NET MVC Forum
1 answer
8.7K+ views
Hi,
I have various columns in different Kendo grids binded to a boolean field of my Sql database (using Ajax binding).

I'd like to view and to edit each boolean field using simple checkbox .
I've read the forum and the examples (custom editor and your FAQ) but I wonder if it's possibile to write a custom editor template "Checkbox" similar to "DateTime" or to "GridForeignKey" and use it in each boolean column . 
Is it possibile?

Thanks in advance,

Luca
Martin
Telerik team
 answered on 01 Apr 2020
7 answers
1.9K+ views
Hi,

I am trying to get the grid to go back to page one on any sorting or filtering operation (ServerOperation=true) on an ajax enabled grid.  I noticed even the samples dont return to page one when sorting - it leaves you right on the same page.

Right now I do this:
$("#clients-grid").data("kendoGrid").dataSource.read()

and it does a read, but leaves it on the page the user was last at.  How do I get this to go back to page 1?

Thank you.
David A
Sivaramakrishna Reddy
Top achievements
Rank 1
Veteran
 answered on 31 Mar 2020
2 answers
95 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
129 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
191 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
148 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
866 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
609 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
Iron
 answered on 28 Mar 2020
1 answer
161 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
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
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
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
Security
ColorPicker
DateRangePicker
Wizard
Styling
Chat
DateInput
MediaPlayer
TileLayout
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
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
SmartPasteButton
PromptBox
SegmentedControl
LLM Kit
+? 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?