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

Hi

I have installed a trial version to have a play around with the Scheduler control.

I have put together a basic ​page, but have a problem when attempting to edit an event.  After double clicking on the event, the event dialog opens. Then, whenever I hit Cancel or the close (X) button, I get the following error:

 Unhandled exception at line 10, column 30735 in kendo.all.min.js

Javascript runtime error: unable to get property 'uid' of undefined or null reference.

The Save button works fine. 

 I am using Kendo.Mvc.dll 2015.2.805.545, and Visual Studio 2013.

 Any ideas on why this is failing?

Cheers, Jarrod

Jarrod
Top achievements
Rank 1
 answered on 14 Aug 2015
8 answers
178 views
Hello,

like the title reveals, I need to display data, that is updated irregularly, but at least once every few seconds.

Is it possible to bind the Chart to a SignalR hub, like it is for the grid? (http://demos.telerik.com/aspnet-mvc/grid/signalr)
Which other approaches promise good and efficient results? Polling of WebAPI? A separat SignalR function and adding data to chart on client side?

Thank you in advance.
Robert
Top achievements
Rank 1
 answered on 14 Aug 2015
1 answer
81 views

Hi

 Please may we have a similar "Navigator" feature as in the Stock chart, for the Scatter chart.

 At least where the X axis is time.

 This would be of great benefit.

 Alternatively how may we customise using two sliders a similar feature.

 Kind Regards

David

Iliana Dyankova
Telerik team
 answered on 14 Aug 2015
1 answer
455 views

Hello,

 I have been trying to figure out how to set value of my multiSelect after server filtering and adding some conditions so that some elements cannot be deleted.  The multiselect works fine *as long* as the user uses the mouse to select elements to add. Once the user decides to filter by using the keyboard the multiselect does not render the added item correctly even though the values i set to them are correct.Here is my code:

Edit.cshtml:

   @Html.Kendo().MultiSelect().Name("msGroupMembers").DataTextField("FullName").DataValueField("Id").Value(new[] { new { FullName = Model.SelectedTO.Select(x => x.Text), Id = Model.SelectedTO.Select(x => x.Value) } }).Filter(FilterType.Contains).Events(e => e.Change("onChangeEdit").Close("onCloseEdit").Select("onSelect")).DataSource(source => source
                        .Custom()
                        .Transport(transport => transport
                        .Read(read =>
                        {
                            read.Action("GetGroupMembers", "ScheduleRequest")
                            .Data("testOfficerFiltering");
                        }))
                        .ServerFiltering(true)).HtmlAttributes(new { required = "required" })

 Controller:

  public ActionResult SetGroupMembers(List<int> items, string teamLead)
        {
            Business.Entities.RTSSUser user = userService.GetRTSSUser(User.Identity.Name);

            // check to see if we have a lead.
            int lead;
            bool result = int.TryParse(teamLead, out lead);
            if (!result)
            {
                lead = -1;
            }

            try
            {
                int findLead = items.FindIndex(s => s == lead);
                int findOwner = items.FindIndex(s => s == user.Person.Id);

                //if our owner is also the lead, place in first spot
                if (findLead == findOwner && findOwner == -1)
                {
                    items.Insert(0, user.Person.Id);
                }

                else if (findLead == -1)
                {
                    items.Insert(1, lead);
                }

                else if (findOwner == -1)
                {
                    items.Insert(0, user.Person.Id);
                }

            }
            catch (Exception e)
            {
                // handle an empty list passed.
                List<int> msUsers = new List<int>();
                msUsers.Insert(0, user.Person.Id);
                return Json(msUsers, JsonRequestBehavior.AllowGet);
            }
           
            
            return Json(items, JsonRequestBehavior.AllowGet);
        }​

Javascript:
function onChangeEdit(e) {
   
    var lead = $("#cbTeamLeadName").data("kendoComboBox").value();

    var msValue = this.value();
    var arrayLength = msValue.length;
    var newArrayValue = new Array();

    //store values into array
    for (var i = 0; i < arrayLength; i++) {
        newArrayValue.push(msValue[i]);
        console.log(msValue[i]);
    }    

    //get owner
    $.ajax({
        type: 'GET',
        url: SetGroupMembersUrl,
        data: {
            "items": newArrayValue,
            "teamLead": lead
        },
        contentType: 'application/json',
        async: true,
        cache: false,
        dataType: 'json',
        traditional: true,
        success: function (data) {          
            populateMs(data);
         
        },        
        error: function () {
            console.log("Could not get AgencyName");
        }
    });
    
}

 
function populateMs(e) {
    var multiSelect = $("#msGroupMembers").data("kendoMultiSelect");
    multiSelect.dataSource.filter({});
    multiSelect.value([])
    multiSelect.refresh();
    multiSelect.value(e);
    alert("Dat: " + e);
}

I have found this similar thread: http://stackoverflow.com/questions/22010796/kendo-multiselect-value-setting-bug and was wondering if it is a bug or if i am doing something wrong. Thanks in advance!

Daniel
Telerik team
 answered on 13 Aug 2015
3 answers
1.2K+ views
Hi,

I'm trying to bind a Kendo.Dropdownlist to an enum in MVC but cant seem to get it working. It binds OK to get the values but when I change the value its not reflected in the ViewModel. I have attached two screenshots of my editor template (one working and one not). The one that works use the built in EnumDropdownListFor but this doesn't have the styling like the Kendo UI. Any ideas how i can get the Kendo dropdown to work?

@model CapType

@{
    var enumItems = EnumHelper.GetSelectList(typeof(CapType));

    var options = new SelectList(enumItems, "Value", "Text", Model);
}

@(Html.Kendo().DropDownListFor(m => Model)
              .Name("eCapType")
      .BindTo(options))
Jason
Top achievements
Rank 1
 answered on 13 Aug 2015
1 answer
200 views
Hi,
i've created a sample Application for the Grid with ASP.NET SignalR having real-time updates 

http://webapps-in-action.com/post/Telerik-Kendo-UI-Grid-Updating-Stock-Data-with-SignalR-in-ASPNET-MVC4

Greetings Otto
Nathan
Top achievements
Rank 1
 answered on 13 Aug 2015
2 answers
274 views

I have been looking at the datepicker mask example at

http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/datepicker/how-to/masked-date-picker-grid

Is this solution valid for MVC wrappers also?

I have included the code but still no mask.

Thanks

 

 

 
Alan Mosley
Top achievements
Rank 1
 answered on 13 Aug 2015
6 answers
923 views

I have a simple grid w/ ajax binding and some nested grids, all i want to do is have an inline edit for one field and set the other 2 to readonly.  One of the fields is a bool and when i set Editable(false) in the datasource model i get an exception saying that the value passed to the dictionary is null but with Editable(true) or no Editable call it works fine.  The RequireAll bool shouldnt be changeable in this grid, its just there for reference.  

 

@(Html.Kendo().Grid<ScheduleQual>().BindTo(Model.Quals)
          .Name("grid")
          .Columns(columns =>
          {
              columns.Bound(p => p.Qual.Name).Title("Name");
              columns.Bound(p => p.Id).Hidden();
              columns.Bound(p => p.Qual.RequireAll);
              columns.Bound(p => p.Required);
          })
          .Editable(editable => editable.Mode(GridEditMode.InCell))
          .Pageable()
          .Sortable()
          .ClientDetailTemplateId("template")
          .Scrollable(scr => scr.Height(430))
          .DataSource(dataSource => dataSource
              .Ajax()
              .Batch(true)
              .PageSize(20)
              .Model(model =>
              {
                  model.Id(p => p.Id);
                  model.Field(p => p.Qual.Name).Editable(false);
                  model.Field(p => p.Qual.RequireAll);//this is the field i want to make readonly
                  model.Field(p => p.Required).DefaultValue(0).Editable(true);
              })
              .Read(read => read.Action("HierarchyBinding_Quals", "Scheduling"))
           )
          .Events(events => events.DataBound("dataBound"))
              )

Maybe i'm just doing something wrong, i just started using these controls.  

 

As a side note i've noticed that sometimes the RequireAll column renders as 'true'  or 'false' and sometimes with a green icon that says Yes.  is it possible to force the icon style to display when readonly instead of the true false?

 

John

Alexander Popov
Telerik team
 answered on 13 Aug 2015
1 answer
516 views

Hello,

 If the Telerik controls do not support this, then I would like to know. Thanks in advance

 I have a Grid that binds to a ViewModel, that in turn has 2 other types of classes as its properties. I am trying to populate the grid rows with both, and either property could be Null. In one of these classes, there is a property that is a List<Skill> where each of the Skills are classes that has a string that I need to concatenate into a larger one to display for the 'Skill' grid column. Right now I'm just making the concatenated string in the controller and adding an extra property onto my ViewModal:

 columns.Bound(p => p.SkillsDisplayed).Title("Skill").ClientTemplate("<p>#= SkillsDisplayed ? SkillsDisplayed : '' #</p>");

 My question is: is there a way to put a Razor block in the ClientTemplate (or some other way in the column binding) to iterate through the List<Skill> and concatenate those object's strings together and display the resulting string? I have already tried this with javascript similar to the above, but the nested '#'s' makes such a function highly unreadable and I'm not sure I can achieve that anyways. Is this even possible?

Nikolay Rusev
Telerik team
 answered on 13 Aug 2015
1 answer
275 views

Hi,

I'm new to Telerik MVC and while I've been able to find most of the things I need, I am wondering what is the standard way, once you have grabbed grid row data in a client-side javascript function, to pass the selected data back to your C# controller (or wherever that needs to go). I apologize if that concept is intuitive to everyone but me. My sample javascript function looks like the following:

function getSelectedInformation(e){

     var workerID = e.id;

      var workerData = $('#gridHoldingWorkerInfo').data('kendoGrid').dataSource.data();

      var selectedAssignments = $('#gridHoldingWorkAssignments').data('kendoGrid').select();

}

I'll worry about iterating through the row information myself, but I read on a previous forum post where someone said to do an $ajax call, could someone please elaborate on this? By the way, on my grids I use Ajax to read the information and populate the grids. 

 

Radoslav
Telerik team
 answered on 13 Aug 2015
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
Rating
ScrollView
ButtonGroup
CheckBoxGroup
Licensing
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
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?