Telerik Forums
UI for ASP.NET MVC Forum
2 answers
363 views
Message: Exception: System.InvalidCastException: Unable to cast object of type 'Kendo.Mvc.CompositeFilterDescriptor' to type 'Kendo.Mvc.FilterDescriptor'.
   at Kendo.Mvc.Infrastructure.Implementation.FilterNodeVisitor.Visit(PropertyNode propertyNode)
   at Kendo.Mvc.Infrastructure.Implementation.OrNode.Accept(IFilterNodeVisitor visitor)
   at Kendo.Mvc.UI.DataSourceRequestModelBinder.BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
   at System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor)
   at System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor)
   at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
Grahame
Top achievements
Rank 2
 answered on 29 Apr 2014
3 answers
104 views
I use latest Telerik release (423) and get different rendering of the ddList in a project. First I thought I had done something wrong, this could happen sometimes. However I started a new project with the Telerik mvc5 template and got same result.
Theme bootstrap.
IE and firefox and Safari ok Chrome not so good.(latest versions)

Jan Olsmar
Top achievements
Rank 1
 answered on 29 Apr 2014
2 answers
299 views
Hello

My code is based on this thread:
http://www.telerik.com/forums/multiple-row-selection-without-holding-ctrl-key

I have a grid:
01.@(Html.Kendo().Grid(Model.globalConfigData.Countries)
02.      .Name("CountryFilter")
03.      .Columns(columns =>
04.               {
05.                   columns.Bound(p => p.value).Width(100).Title("Wert").HtmlAttributes(new { Name = "Value" });
06.                   columns.Bound(p => p.id).Width(30).Title("Id").Hidden().HtmlAttributes(new { Name = "Id" });
07.               })
08.      .Scrollable()
09.              .Selectable(selectable => selectable.Enabled(false))
12.      .DataSource(dataSource => dataSource
13.          .Server()
14.          .Model(model => model.Id(p => p.id)))
15.)

With the custom-multiselect configured:
1.$(document).ready(function ()
2.{
3.    // Enables multiselect on the grid without holding CTRL
4.    $("#CountryFilter").delegate('tbody>tr', 'click', function ()
5.    {
6.        $(this).toggleClass('k-state-selected');
7.    });
8.});

And then a function which is fired by a button:
01.function onClick_FilterButton(e)
02.{
03.    var counter = 0;
04.    var ctySelected = [];
05. 
06.    var entityGrid = $("#CountryFilter").data("kendoGrid");
07.    var rows = entityGrid.select();
08. 
09.    rows.each(function (index, row)
10.    {
11.        ctySelected[counter] = row.cells[1].innerText;
12.        counter++;
13.    });
14. 
15.    $.ajax({
16.        type: "POST",
17.        url: "/Event/FilterButton",
18.        datatype: "json",
19.        traditional: true,
20.        data: { "ids": ctySelected }
21.    });
22.}

Now to my problem:
When I use the normal selection mode of the Kendo-Grid (selectable.Mode(GridSelectionMode.Multiple)), the onClick-function works fine, but when I activate the custom multiselect-mode, the function crashes at line 7 (entityGrid.select() => value is Null or undefined)

How can I get the selected rows when I use this functionality?

A second (not urgent) question:
1.ctySelected[counter] = row.cells[1].innerText;

Is it possible to get the cell by it's name, like:
1.ctySelected[counter] = row.cells["MyValue"].innerText;

Kind regards
Jürgen
Jürgen
Top achievements
Rank 1
 answered on 29 Apr 2014
5 answers
276 views
I'm loading dropdown items like the example for cascading dropdowns.  I can see the correct JSON returned from the server in Fiddler, so I know my methods are correct and the controller is returning data.   The spinning icon still shows.  I've tried to reduce my recordset, there's only about 75 or so returned.  Nothing has worked so far.  any ideas?
Patrick
Top achievements
Rank 1
 answered on 29 Apr 2014
1 answer
42.7K+ views
Hi,

I want to mask Indian cell phone number like +91xxxxxxxxxx .
It is showing +_1__________ instead of +91__________

Please suggest how to do?

Find the attached image for my code and output of screen.

Thanks & Regards,
Bharat
Dimiter Madjarov
Telerik team
 answered on 29 Apr 2014
1 answer
460 views
I'm just getting started with UI for ASP.Net MVC and have been looking for an example on how use BootStrap and Telerik together in a MVC4 project. Have not found any examples. Does anyone know where I might find some. I want to use Bootstrap for my Layout page, and Telerik for UI Controls and widgets. Thanks
Dimo
Telerik team
 answered on 28 Apr 2014
5 answers
147 views
Hi,
I am trying to load a grid from a search button, and it is working great in my view. Then this grid has a nested grid. The nested grid should have a button that upon selected gets a column from the parent grid and a column from the child grid and redirect to a different view (controller action).

Parent grid:
@(Html.Kendo().Grid(Model.Names)
                        .Name("gridPatients")
                        .Columns(col =>
                        {
                            col.Bound(m => m.NAME_FIRST).Title("First Name");
                            col.Bound(m => m.NAME_LAST).Title("Last Name");
                            col.Bound(m => m.SEX).Title("SEX");
                            col.Bound(m => m.DOB).Title("DOB");
                            col.Bound(m => m.MRN).Title("MRN");
                            col.Bound(m => m.PERSON_ID).Title("Person ID").Hidden();
                        })
                        .Pageable()
                        .Sortable()
                        .ClientDetailTemplateId("TheVisits")
                        .DataSource(dataSource => dataSource
                            .Ajax()
                            .PageSize(10)
                            .ServerOperation(false)
                            )  
                    )

Child Grid:
@(Html.Kendo().Grid(Model.PatientVisitsModel.ENCOUNTERS)
                .Name("grid_#=PERSON_ID#")
                .Columns(col =>
                {
                    col.Bound(m => m.FIN).Title("FIN");
                    col.Bound(m => m.BEG_EFFECTIVE_DT_TM).Title("Admit Date");
                    col.Bound(m => m.LOCATION).Title("Location");
                    col.Bound(m => m.STATUS).Title("Status");
                    col.Command(c => c.Custom("Select").Click("DirectToPdfCreator(#=PERSON_ID#)"));
                })
                     .DataSource(dataSource => dataSource
                    .Ajax()
                    .PageSize(5)
                    .Read(read => read.Action("_TheVisits", "PatientSearch", new { PERSON_ID = "#=PERSON_ID#" }))
                )
                .Pageable()
                .Sortable()
                .ToClientTemplate()               
        )

The problem is whenever I click on the arrow to load child grid, it automatically calls the js function "DirectToPdfCreator" even though I didn't click on the select button in the child grid. Please advice and thanks in advance.

Shehab
Petur Subev
Telerik team
 answered on 28 Apr 2014
3 answers
168 views
After the most recent release of the Kendo MVC wrapper, I noticed a new config option (HighlightPath(boolean)) for the tabstrip builder.  The basic description given is to select an item depending on the current URL.  However, I haven't been able to locate anything in the API documentation that expands on this to explain what the URL format should be, how to set it, etc.  Is there something I am missing?
Daniel
Telerik team
 answered on 28 Apr 2014
1 answer
100 views
I'm writing a small mvc application for time scheduling. We will need the basic unit of time reservation to be 15 mins. I did some searching, it seems that minutesPerRow is exactly property I need. However, when the installation was complete, I can't seem to find the minutesPerRow property  using Visual Studio's intellisense. Is it still available? Or is there some kind of how-to to make it work? Thanks!
Rosen
Telerik team
 answered on 28 Apr 2014
2 answers
81 views
We have a project with Telerik MVC Extensions which we're migrating it to Kendo UI. There's only one significant issue when using ForeignKey columns in Grids.

I believe that this is caused by the EditorTemplate file GridForeignKey.ascx. When it's using a Telerik DropdownList it does not work 100% properly in Kendo Grids, when I set it to Kendo, it does not work 100% properly on old Telerik grids.

How can I set to Kendo use a different one for its foreign key? We have added Kendo EditorTemplate to EditorTemplates\Kendo folder.

Thanks,
Ezequiel

Ezequiel
Top achievements
Rank 2
 answered on 25 Apr 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?