Telerik Forums
UI for ASP.NET MVC Forum
1 answer
212 views

Hi,

I am using Kendogrid sort on a column which is a string with alphanumeric characters. For some reason the sort does work example I have a strings

DDD-TEST AUTO

BARROWCLOUGH

empty string

the order which i get when i sort are

DDD-TEST AUTO

empty string

BARROWCLOUGH

When i sort always puts DDD- as first whether its ascending or descending, next is the empty and then BARROW. Can you please help me on this as why is this happening.

 

Thanks,

 

Yanislav
Telerik team
 answered on 14 Dec 2021
1 answer
336 views

Hey, I want to create a chart with a trend line in kendo MVC.

Is there a way to accomplish this in kendo MVC?

Or do I have to calculate every single point in the trend line myself?

Anton Mironov
Telerik team
 answered on 14 Dec 2021
1 answer
525 views
Hi - is it possible to rotate images with the image editor in ASP.NET MVC library?
Yanislav
Telerik team
 answered on 13 Dec 2021
0 answers
100 views

Hello, I'm trying to add one kendogrid to my page and load the data received in a property of my model and then sumbit them again.

I can show items but whsn send back to controller with a submit I recevive null in controller.

Anyone could help me?

This is my current code:

View

 

Controller

Miguel
Top achievements
Rank 1
 asked on 13 Dec 2021
1 answer
291 views

Hello, I followed the example described here to add a new row to a grid for .net core. 

https://demos.telerik.com/aspnet-core/grid/editing-custom?_ga=2.26293876.833224250.1638885818-877575679.1613496852&_gac=1.254567930.1636639521.CjwKCAiAm7OMBhAQEiwArvGi3LGIkgkIa0cryh_i3sqYkeTw5t6X4lLPrldP-jBbXgDwqmTnAOAOkhoC-yQQAvD_BwE

All works fine as it is in the example but if I change the GridEditMode to Popup then when it opens the popup it doesn't show the editor template DropDownListFor.

Can you help me out in order to have this working with the GridEditMode.Popup ?

 

Thanks,

Pedro

Yanislav
Telerik team
 answered on 13 Dec 2021
2 answers
172 views

I want to add checbox to my grid. I tried to use the Select() method but the method shows an error No overload for method Select takes 0 arguments.  I need to pass to controller a collection of id elements that the user has selected.

    @(Html.Kendo()
             .Grid<Model>()
             .Name(gridId)
             .Columns(col =>
             {
                 col.Select();
                 col.Bound(fds => fds.Id);
                 col.Bound(fds => fds.CreateDateTime).ClientTemplateDateTime();
                 col.Bound(fds => fds.IdClient);
             })
             .Pageable()
             .Sortable()
             .DefaultPageable()
             .Resizable(c => c.Columns(true))
             .AllowCopy(true)
             .DataSource(d =>
                  d.Ajax()
                        .Model(m => m.Id(vm => vm.Id))
                        .Read("GetAnalysis", "Export")))

 


Anonim
Top achievements
Rank 1
Iron
 answered on 13 Dec 2021
1 answer
190 views

Hi,

I have a Model object which is used to create the parent Kendo Grid. This Model object contains a list of object which is used as a data source to another nested grid created with a ClientDetailTemplate and DetailInit event. The nested grid is coming up fine but I am unable to perform any grid operations like sorting or filtering. It does not give any error but the grid just closes down.

I think I might be missing some configuration in DetailInit event method to make sure the sorting/filtering operations does not do server operations. So I used  grid.dataSource.serveroperation = false; in detailInit event. still the grid just closes in and looks like its trying to do server operation for sorting and filtering. Following is an example of the code that I am using:


public class ParentModel
   {
      public long ParentId { get; set; }
      public List<ChildModel> ChildModelList{ get; set; }
      ...
   }

@(Html.Kendo().Grid<ParentModel>()  
    .Name("Grid")
    ...
    .ClientDetailTemplateId("nested_grid")
    .Events(e => e.DetailInit("detailInit"))
    ...
)
  
<script id="nested_grid" type="text/kendo-tmpl">
    @(Html.Kendo().Grid<ChildModel>()
               .Name("ParentModel_#=ParentId#")
               .Sortable()
               .Filterable()
               .ToClientTemplate()
     )
</script>
  
<script>
    function detailInit(e) {
        var grid = $("#ParentModel_" + e.data.Name).data("kendoGrid");
        grid.dataSource.data(e.data.ChildModelList);
        grid.dataSource.serveroperation = false;
        }
</script>
Thanks!
Eyup
Telerik team
 answered on 13 Dec 2021
1 answer
89 views

Hello,

My MVC project used kendo grid control which contain date column.  It seems date filter does not work  - after I clicking Filter button as below Page refreshed without filter. Any suggestion? Thanks in advance.

 

 

in View:

...

 columns.Bound(model => model.HireDate).Width(120).Format("{0:yyyy/MM/dd}");

...

  .ColumnMenu(columnMenu => columnMenu.Enabled(true).Filterable(true).Sortable(false).ComponentType("modern"))

Anton Mironov
Telerik team
 answered on 13 Dec 2021
0 answers
103 views

Hi

I've explored the use of Moq. I found it useful, except for the fact that it relies heavily on code style that uses dependency injection. As I'm working on some existing legacy code, it can become quite the refactoring effort. The code base also includes some assembly references that could not be addressed via Moq.

Microsoft Fakes worked great IMHO. The only downside I saw was the requirement of VS Enterprise 2019. I'm not sure if I can get my employer to pay for the $5k/yr/developer. I really liked the ability to generate fakes on an assembly directly within VS.

Telerik's solution looks equally expensive. I've yet to explore it. Fakes, Stubs, and Mocks (telerik.com)

Prig looks viable, but looks like a pain to setup with powershell scripts, omegle etc.

Thanks

Jack
Top achievements
Rank 1
 updated question on 13 Dec 2021
1 answer
357 views

ASP.NET MVC 2020.3.915, development on an enclave network, so upgrading to newer versions takes an act of Congress, and all the code shown here is typed in by hand—meaning if there are any obvious typos, don't take that as the reason it's not working.

I have a DropDownList set up to get a fresh list of items based on Change and Close events on two DatePicker controls, and it works exactly as desired. I am trying to move this same set of controls to an (existing) preferences settings page. I copied the cshtml code verbatim and made appropriate changes, but it's not working.

Here's the control that is working. It sits inside a TabStrip control:


<div class="editor-field">
    @(Html.Kendo().DropDownListFor(m => m.ReportType)
        .Name("ReportType")
        .DataTextField("Text")
        .DataValueField("Value")
        .OptionLabel("Select a Report Type...")
        .DataSource(source =>
        {
            source.Read(read =>
            {
                read.Action("GetFilteredTeams", "Home").Data("get_Dates");
            }).ServerFiltering(true);
        })
        .HtmlAttributes(new { @class = "reportTypeDropdown" }))
</div>

When I inspect this page, I see that this JavaScript was generated:

kendo.SyncReady(function(){jQuery("#ReportType").kendoDropDownList({dataSource":{"transport":{"read":{"url":"/Reporting/Home/GetFilteredTeams","data":getDates},"prefix":""},"serverFiltering":true,"filter":[],"schema":{"errors":"Errors"}},"dataTextField":"Test","dataValueField":"Value","optionLabel":"Select a Report type..."});});


Again, I copied the DropDownList over to the preference page, where it's inside a PanelBar, made appropriate changes, and this is what it looks like: (FWIW, the get_Dates JavaScript function is in a separate JavaScript file associated with the preferences page. Also, the DropDownList is not bound to the model here).

<div class="pref-sub-section-item">
    @(Html.Kendo().DropDownList
        .Name("ReportTypePref")
        .DataTextField("Text")
        .DataValueField("Value")
        .DataSource(source =>
        {
            source.Read(read =>
            {
                read.Action("GetFilteredTeams", "Preferences").Data("get_Dates");
            }).ServerFiltering(true);
        })
        .HtmlAttributes(new { @class = "reportTypeDropdown" }))
</div>

However, this is the JavaScript that gets generated:


kendo.SyncReady(function(){jQuery("#ReportTypePref").kendoDropDownList({"dataTextField":"Test","dataValueField":"Value"});});

If I copy the JS generated from the working page, change the name of the control and the URL, then paste it in the console (or add it to a document.ready block), the DropDownList starts working in sync with the DatePickers.

I've tried fooling with the CSS in case that was erroring out and causing a conflict. I've had my eye on the console, and there are no JS errors popping up. I've also taken the non-working version out of the PanelBar and just pasted the <div> to the root/top level on that page. Same results. No JS, and it doesn't work. I've also tried adding a property to the model and using DropDownListFor (just throwing darts, really), and still, no luck.

It seems the problem is that on my preferences page, Kendo is not generating the full JS for some reason. This is such a massive project that it's not really feasible to create a discrete model where the problem is repeatable. I realize without viewing the full project, it will be hard to pinpoint, but I'm just looking for some help on how to troubleshoot what's going on here, since looking under the hood of Kendo has it's limits.

Oh, also, the page that is working is \Reporting\Home\Index.cshtml — the page that is not working is \Preferences\Index.cshtml
John
Top achievements
Rank 1
Iron
 answered on 10 Dec 2021
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?