Telerik Forums
UI for ASP.NET MVC Forum
1 answer
515 views
I can follow the help topic on how to extend the Kendo UI widgets here, but I'm looking for how to do a similar thing for MVC Controls. 

If an MVC control has been initialized and rendered into the page's partial view, how can I tell the MVC control to use my Kendo Widget which was inherited from the original control?

Thank you
Dimitar
Telerik team
 answered on 09 Oct 2017
2 answers
255 views

Hello all,

So, as the title states I am having an issue where my grid's CRUD operations all perform GET requests instead of POST, PUT, and DELETE. 

Here is my grid and datasource: 

@model ERMgtProgram.Models.ProductViewModels.GradeGroupViewModel
@{
    ViewBag.Title = "Grade Group";
}
 
<h2>@ViewBag.Title</h2>
 
@(Html.Kendo().Grid<ERMgtProgram.Models.ProductViewModels.GradeGroupViewModel>()
      .Name("gradeGroupGrid")
      .Columns(columns =>
      {
          columns.Bound(c => c.GradeGroups).Width(140);
          columns.Command(command => { command.Edit(); command.Destroy(); }).Width(180);
      })
      .ToolBar(toolbar =>
      {
          toolbar.Create();
      })
      .HtmlAttributes(new { style = "height: 700px;" })
      .Editable(editable => editable.Mode(GridEditMode.PopUp))
      .Pageable(pageable => pageable
        .Refresh(true)
        .PageSizes(new int[] { 10, 20, 50, 100, 250, 1000 })
        .ButtonCount(5)).Navigatable()
      .Selectable(selectable =>
      {
          selectable.Mode(GridSelectionMode.Multiple);
          selectable.Type(GridSelectionType.Row);
      })
      .Sortable(sortable =>
      {
          sortable.SortMode(GridSortMode.MultipleColumn);
      })
      .Filterable()
      .Scrollable()
      .DataSource(dataSource => dataSource
        .Custom()
        .Batch(true)
        .PageSize(50)
        .Schema(schema => schema.Model(m => m.Id(p => p.GradeID)))
        .Transport(transport =>
        {
            transport.Read(read =>
               read.Url("http://localhost:62664/api/gradegroup")
                   .DataType("jsonp")
                   .Type(HttpVerbs.Get)
            );
            transport.Create(create =>
                create.Url("http://localhost:62664/api/gradegroup/create")
                    .DataType("jsonp")
                    .Type(HttpVerbs.Post)
            );
            transport.Update(update =>
                update.Url("")
                    .DataType("jsonp")
                    .Type(HttpVerbs.Put)
            );
            transport.Destroy(destroy =>
             destroy.Url("")
                 .DataType("jsonp")
                 .Type(HttpVerbs.Delete)
            );
        })
      )
)
<script>
$(function() {
    var grid = $("#gradeGroupGrid").data("kendoGrid");
 
    grid.dataSource.transport.options.update.url = function (data) {
        return "http://localhost:62664/api/gradegroup/update/" + data.models[0].GradeID;
        }
 
        grid.dataSource.transport.options.destroy.url = function(data) {
        return "http://localhost:62664/api/gradegroup/delete/" + data.models[0].GradeID;
        }
        });
</script>

 

My datasource is making calls to a remote WebAPI. The read method works, and the data popluates the grid just fine; but, for my create, update, and destroy methods the datasource sends GET requests even after I specify the "Type" on the various transport methods. I have been at this for some time, and it seems like it should work, but it just doesn't change my request types. 

I attached a screenshot of the response. 

 

Any help would be greatly appreciated.

Ruben

 

Stefan
Telerik team
 answered on 09 Oct 2017
1 answer
423 views

Hi,

I am using a grid that initially only pulls the most commonly used data fields for each record in the grid (what I call level 1).  Optionally, the user can expand a given row, in which case additional details are displayed in a nested grid, which I call level2.  This works fine when a single row is expanded. 

I have a method for the user to expand all of the rows currently displayed in the level1 grid.  When this occurs, a call is made to the server for each row that is being expanded in order to pull the additional details for the level2 grid for each row.  This is a very slow operation when I am displaying a large number of rows in the level1 grid (for example, 100 rows).

I am wondering if it is possible to query the data for all of the rows to be expanded in a single call to the server and then use the resulting data set to populate all of the level2 grids without having to make n round trips to the server for one record at a time. Querying and returning the data for all rows is not a problem.  But since each level2 grid is a separate object, I am not sure how to point them all to the appropriate data on the client side, or if it is even possible.

Or is there a better approach to populating multiple level2 grids that would perform well?

Thanks!

Stefan
Telerik team
 answered on 06 Oct 2017
7 answers
503 views

I'm trying to get a decimal value into the Kendo numeric textbox from a viewmodel (MVC)
The value for the numeric textbox stays empty in Chrome but not in IE.

Besides that I notice a difference in de HTML output between IE and Chrome:

IE
<input name="Value" class="k-input" id="Value" role="spinbutton" aria-disabled="false" aria-readonly="false" aria-valuenow="125,1" style="display: none;" type="text" value="125,100" data-val-required="The Value field is required." data-val="true" data-role="numerictextbox" data-val-number="The field Value must be a number.">

CHROME
<input data-val="true" data-val-number="The field Value must be a number." data-val-required="The Value field is required." id="Value" name="Value" type="text" value="125,100" data-role="numerictextbox" role="spinbutton" style="display: none;" class="k-input" aria-valuenow="" aria-disabled="false" aria-readonly="false">
The initial value of the aria-valuenow is empty in Chrome where IE provides the actual value from the (view)model.

 

 

Viktor Tachev
Telerik team
 answered on 06 Oct 2017
3 answers
304 views

Probably I am doing something wrong and hopefully a simple fix - I am seeing the up triangle sprite overlaid on all sprite images when using a custom theme.  As seen here.

I had gone through the process of creating a custom theme based off of material through here. In the generated kendo.custom.css file, I replaced all references to images (url('none/sprite.png'); with the proper path on my web server.

Everything looks fine with standard material theme:

<link href="https://kendo.cdn.telerik.com/2017.3.913/styles/kendo.material.min.css" rel="stylesheet" type="text/css" />

 

But the sprites become overlaid after I specify my custom theme:

<link href="../../Content/kendo.custom.css" rel="stylesheet" type="text/css" />

 

Orlin
Telerik team
 answered on 05 Oct 2017
13 answers
5.5K+ views

Hi there,

 

I'm having a problem with a DropDownListFor inside a modal popup when i have the filter option active.

Basically i have this piece of code.   

    @(Html.Kendo().DropDownListFor(c => c.StopId)
                                                                        .DataTextField("Name")
                                                                        .DataValueField("Id").OptionLabel(" ")
                                                                        .DataSource(source =>
                                                                        {
                                                                            source.Read(read =>
                                                                            {
                                                                                read.Action("ReadStop", "MasterData");
                                                                            });
                                                                        }).Filter(FilterType.Contains)
                                                                )

If i remove the Filter(FilterType.Contains) it works well, and if its outside of the modal (with the filter) it will work ok also. 

 

Any sugestion? did anyone had the same problem?

 

Thanks! 

M. Macias

Ivan Danchev
Telerik team
 answered on 05 Oct 2017
1 answer
151 views

We're creating editor with these settings:

01.var editor =
02.                html.Kendo()
03.                    .EditorFor(expression)
04.                    .Tag("div")
05.                    .Encode(false)
06.                    .HtmlAttributes(htmlAttributes)
07.                    .Messages(x => x.FontNameInherit("font").FontSizeInherit("size"))
08.                    .Tools(toolsConfigurator)
09.                    .Events(events => events
10.                          .Change("onKendoEditorChange")
11.                          .Execute("onKendoEditorExecute")
12.                          .Select("onKendoEditorSelect")
13.                          .Paste("onKendoEditorPaste"));

 

We use .Tag parameter because we need to access editor content.(Without .Tag editor is in iframe)

So when we're trying to copy & paste in the editor, copied text and cursor always jumps to the bottom of the editor, no matter where it was.

Without .Tag, pasting works fine.

Can You suggest any possible solution?

Thanks.

Ianko
Telerik team
 answered on 05 Oct 2017
1 answer
226 views

I'm importing legacy spreadsheet templates with images. When I load the spreadsheet, the images are missing. Does the spreadsheet control recognize image formats?

I've attached the legacy excel template, with the corresponding image of it loaded in the spreadsheet control.

I'm using the Upload control to save the templates as byte streams in a SQL Server database.

Nencho
Telerik team
 answered on 05 Oct 2017
1 answer
79 views

Hi all,

I am facing a weird issue and I am not sure if this is a bug on my or your side.

My grid has 146 items and displays 10 at once, therefore I have 15 pages. When I click on the "next page" arrow it works fine (shows the next entries) until I arrive on page 6. Then the items are the same until page 10, and from 11 on my grid displays again different entries.

@using Haris.Web.Controllers.Admin
@using Haris.Web.Models.Admin
@{
    ViewBag.Title = Texts.Views_UserRole_Index_Title;
}
@(Html.Kendo().Grid<UserRoleGridModel>()
      .Name("userroles-grid")
      .Columns(columns =>
               {
                   columns.Bound(e => e.ClientId).Width(50).Title(Texts.Views_UserRole_Index_Grid_ClientId);
                   columns.Bound(e => e.Role).Width(350).Title(Texts.Views_UserRole_Index_Grid_RoleList).Sortable(false).Filterable(false);
               })
      .Sortable()
      .Pageable(p =>
          p.ButtonCount(5)
           .PageSizes(GlobalSettings.PageSizeArray)
           .Refresh(true)
      )
      .Filterable()
      .Deferred()
      .DataSource(dataSource =>
          dataSource.Ajax()
                    .Events(ev => ev.RequestEnd("kendoGridRequestEnd").Error("kendoGridError"))
                    .Read(read => read.Action<UserRoleController>(c => c.List(null)).Data("kendoGridAntiForgery"))
                    .Destroy(builder => builder.Action("Delete", "UserRole").Data("kendoGridAntiForgery"))
                    .Model(factory => factory.Id(model => model.UserId))
      )
      .AutoBind(false))

Stefan
Telerik team
 answered on 05 Oct 2017
2 answers
297 views

I had a problem when trying to run the "Configure Project" from right-clicking the project to get to the UI for ASP.NET Menu. I can select the theme and click next then I change from Use CDN support to copy global resources and I get the UI for ASP.NET MVC Visual Studio Extensions have recovered from an error. What is it looking for on the file system and what didn't install or did I miss something during the installation process? The full error is below.

Thanks,

John

An error occurred while running the wizard.

Error executing custom action Telerik.VSX.Web.Actions.CopyResourcesAction: System.IO.DirectoryNotFoundException: Attempted to access a path that is not on the disk.
   at Telerik.VSX.ProjectConfiguration.ProjectFileManager.CopyDirectoryContentsPrivate(String sourceFolderPath, String folderRelativePath, Boolean confirmOverwrite, Boolean overwrite, Boolean onlyUpdateFiles, String excludeDirectoryPattern)
   at Telerik.VSX.ProjectConfiguration.ProjectFileManager.CopyDirectoryContents(String sourceFolderPath, String projectRelativePath)
   at Telerik.VSX.Web.Actions.CopyResourcesAction.ModifyScripts()
   at Telerik.VSX.Web.Actions.CopyResourcesAction.ModifyResources()
   at Telerik.VSX.Web.Actions.CopyResourcesAction.Execute(WizardContext wizardContext, IPropertyDataDictionary arguments, IProjectWrap project)
   at Telerik.VSX.Actions.ProjectActionBase.Execute(WizardContext wizardContext, IPropertyDataDictionary arguments)
   at Telerik.VSX.WizardEngine.Actions.ActionBase.Telerik.WizardFramework.IAction.Execute(IWizardContext wizardContext, IPropertyDataDictionary arguments)
   at Telerik.VSX.WizardEngine.ActionManager.ExecActions()

Momchil
Telerik team
 answered on 04 Oct 2017
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
DropDownButton
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
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
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?