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

Hi 

I've found a link which shows how to retrieve the current date range of a view using JQuery :

https://docs.telerik.com/kendo-ui/controls/scheduling/scheduler/how-to/various/view-date-range

I want to allow users to search resources via the currently selected date range.

Is there a way to do this in MVC?

 

Thank you

Phil

 

 

 

Ivan Danchev
Telerik team
 answered on 11 Jan 2018
5 answers
2.3K+ views
Hi, 

I am trying to display the a hyperlink for one of the columns in my Grid. I added a template column as per the documentation and it is not displaying any content.

I check the server response. It does return the data. The column is disappearing on the client side once tied to the Grid.

Below is the snippet from MVC Grid examples (local-data-binding). I modified a bit to add a template column. You can easily reproduce this by adding the first column to the example at Grid at local-data-binding example.

@model IEnumerable<Kendo.Mvc.Examples.Models.ProductViewModel>
 
@(Html.Kendo().Grid(Model)
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Template(@<text>
            @Html.ActionLink(item.ProductName, "Local_Data_Binding", "Grid", new { id = item.ProductName }, null)
        </text>).Title("Company Name");
        columns.Bound(p => p.ProductName).Title("Product Name");
        columns.Bound(p => p.UnitPrice).Title("Unit Price").Width(130);
        columns.Bound(p => p.UnitsInStock).Title("Units In Stock").Width(130);
        columns.Bound(p => p.Discontinued).Width(130);
    })
    .Pageable()
    .Sortable()
    .Scrollable(scr=>scr.Height(430))
    .Filterable()
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(20)
        .ServerOperation(false)
     )
)

Any suggestions. Looks like this is working for some people.

Thank You,
Franklin
Top achievements
Rank 1
 answered on 11 Jan 2018
4 answers
1.0K+ views

I hope I have what is a simple question, but the answer is eluding me at the moment.  

Background: I have a table where data gets imported into.  Each import is labeled, in a column so that import batches are kept together.

I have a View with a DropdownList that gets populated with a DISTINCT list of those import labels.

What I want to have happen is the grid would initially be empty.  The user will select a label from the dropdownlist, which should then tell the grid to read the data from the database where it matches the UploadLabel selected by the user.

I know I have to create my Grid to that AutoBind is false.  But how do I tell the grid to fetch the appropriate data?  I know I can call the Grid's DataSource.Read method, but where or how do I tell it which data to retrieve? I don't want to do it client side because the import database is very, very, very large.  This is why I want to only return the data corresponding to a specific UploadLabel.

Stefan
Telerik team
 answered on 11 Jan 2018
1 answer
142 views

can you please tell me how can i show message when user save/update tasks or it's resource assignments ? i want to show Indication/Message to user when he performs some action on Gantt Chart,

as well as can you please tell me how can I bind more properties with resources datasource? other than Name ID Color,
i want to show resource's image as well i tried by adding extra property in my data source for resources but could'nt do it. how can i add more property in resource datasource and catch it at client side in task client template for showing image ?

i saw your client template there you have done image functionality using the ID property. i want to do it with other property not the ID property

Veselin Tsvetanov
Telerik team
 answered on 11 Jan 2018
1 answer
210 views

i'm facing this error while saving the sub record.saving Sub task for the 1st time it does'nt show this error but for the edit time.Although the record is Edited in the database but when response is returned to client side  at that this i get this error.

i have attached the image to that error

Veselin Tsvetanov
Telerik team
 answered on 11 Jan 2018
5 answers
674 views

HI

I met a error about Grid : 

  Uncaught TypeError: Cannot read property 'get' of null

I have test my code and found that the Selectable(true) will cause this error : 

View

      @(Html.Kendo().Grid(Model.ListProperty1)
        .Name("ListProperty1Grid")

        .Selectable(selectable =>
        {
          selectable.Enabled(true);
        })


Javascript

        var grid;
        var dataSource;
        //
        dataSource = new kendo.data.DataSource(
        {
            data: ...
        });
        //
        grid = $("#ListProperty1Grid").data("kendoGrid");
        grid.setDataSource(dataSource);

Grid's BUG ?

*Telerik DevCraft UI for ASP.NET MVC R2 2017 SP1
*jquery-2.2.4.js
*jquery-2.2.4.js
*jquery-2.2.4.js

VM22852:93 Uncaught TypeError: Cannot read property 'get' of null
 
    at makeWidgetInfo (<anonymous>:93:44)
 
    at <anonymous>:552:33

        function makeWidgetInfo(w, extended) {
            var el = w.wrapper || w.element;
            var ret = {
                id             : cacheObject(w),
                type           : w.options.name,
                prefix         : w.options.prefix,
                events         : w.events && w.events.length > 0 ? w.events.map(function(evname){
                    return makeSpecial("doclink-event", {
                        event  : evname,
                        widget : w.options.name,
                        prefix : w.options.prefix,
                    });
                }) : undefined,
                element_tag    : w.element.get(0).tagName,  <<< ====== Uncaught TypeError: Cannot read property 'get' of null
                element_id     : w.element.attr("id"),
                element_class  : w.element.attr("class"),
                visible        : el.is(":visible"),
                hasModel       : !!w.dataSource,
                wasInspected   : w === window.$K,
            };
            if (typeof w.value == "function") {
                ret.value = tools.safeValueForJSON(w.value());
            }
            if (extended) {
                ret.widget = tools.safeValueForJSON(w);
                ret.element = tools.safeValueForJSON(w.element.get(0));
                if (w.wrapper) {
                    ret.wrapper = tools.safeValueForJSON(w.wrapper.get(0));
                }
            }
            return ret;
        }

Best regards

Chris

 

 

Preslav
Telerik team
 answered on 11 Jan 2018
2 answers
145 views

Hi.

I know that the ValueAxis.title.rotation option is available in the Kendo UI jQuery library.

I think that there is no option to use it in ASP.NET MVC wrapper, but how do I use this option?

kako
Top achievements
Rank 1
 answered on 11 Jan 2018
3 answers
164 views

Hi,

When using a complex model, validation does not occur (both client (Kendo UI) as well as server) -- only on the Editor helper; my other Kendo UI controls work fine.  Any thoughts on why?  I'm assuming it has something to do with the name and/or ID of the control.

I've included relevant code.  Let me know if you need more info.

View:

<div class="form-group">
    @Html.LabelFor(m => m.Change.Description, new { @class = "col-sm-3 control-label" })
    <div class="col-sm-9">
        @Html.EditorFor(m => m.Change.Description)
    </div>
    <div class="col-sm-offset-3 col-sm-9">
        @Html.ValidationMessageFor(m => m.Change.Description)
    </div>
</div>

 

Model:

public class CreateChangeViewModel
{
    public CreateChangeModel Change { get; set; }
}
 
public class CreateChangeModel
{
    [Display(Name = "Change Implementing")]
    [Required(ErrorMessage = "You must enter a description of the change.")]
    [UIHint("TextArea")]
    public string Description { get; set; }
}

Editor Template (TextArea.cshtml):

@Html.Kendo().EditorFor(model => model).HtmlAttributes(new { style = "width: 100%; height: 200px;" }).Resizable(true)

 

Thanks!

Brian
Top achievements
Rank 2
Iron
 answered on 10 Jan 2018
1 answer
349 views

Problem:

I'm using  columns.Select() in a grid to provide "Select All" functionality with checkboxes.

I have two rows remaining in the grid.

I manually select both. The "Select All" checkbox in the header comes on.

When I loop through to dynamically remove the selected rows from view, the following code finds the "Select All" checkbox in the header and removes the header row. I don't want that.

 Question:

What do I insert in Line 2 in the jQuery code below to detect that it has found the header row and should skip removing it?
I note that the header row has a direct <thead> parent which might be a clue to distinguishing between a regular row checkbox and a header row checkbox.

Thanks for any help.

1.$("#grid").find("input:checked").each(function () {
2.    // make sure this isn't the header row
3.    grid.removeRow($(this).closest('tr'));
Eduardo Serra
Telerik team
 answered on 09 Jan 2018
1 answer
169 views
After doing an upgrade of kendo from 2016.3 to 2017.3 i am finding issues with CSS specifically around icons...

Icons like arrows, filters, paging etc all appear to be displaying differently...

Another issue is that some icons like expand and plus seem to have disappeared totally.... they no longer appear in the code when inspecting the elements in developer tools...

screenshot examples attached...
Magdalena
Telerik team
 answered on 09 Jan 2018
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
+? 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?