Telerik Forums
UI for ASP.NET MVC Forum
2 answers
129 views
I have a combo box bound to remote data:

@(Html.Kendo().ComboBox()
.Name("cbUser")
.HtmlAttributes(new { style = "width:350px" })
.DataTextField("DisplayName")
.DataValueField("Guid")
.Filter("contains")
.AutoBind(false)
.MinLength(0)
.DataSource(source => source
.Read(read => read.Action(AdministrationController.GetUsersAction, AdministrationController.Controller))
.ServerFiltering(true))
.Events(e => e.Change("UserSelected"))
)

If I just focus this control (there are no items yet) and hit the up/down keys I get the following javascript errors:

SCRIPT5007: Unable to get value of the property 'previousSibling': object is null or undefined
kendo.all.min.js, line 14 character 15241


Ande2013
Top achievements
Rank 1
 answered on 18 Jul 2013
4 answers
196 views
This is partially a Kendo Grid question and I think partially a general MVC question.

I have a Grid and I am using a custom popup editor template.  Within that template I have one field (from the grid) which is for EmployeeID.  While the editor window is open I want them to enter the EmployeeID and have it do a lookup and get the employee name for that ID and display it so they can make sure it is correct before they submit.

I'm not really sure how to go about doing that.  Any advice or examples would be greatly appreciated.

Thanks,

Steve
Stephen
Top achievements
Rank 1
 answered on 18 Jul 2013
2 answers
249 views
Hi Telerik team !

I have an issue using tabstrip in ASP.NET MVC4.
I have a dynamic number of tabs (4 for the moment) with a dynamic content based on the tab.
I use a datasource built with JSON to generate my tabs, and the content of the tabs is a partial view (same partial view each time but filled with JSON datasource in a grid).
The funny part is that loading a tab allow me to load the other ones (previous ones) but not the next ones, ie loading the last tab allow me to see all the tabs i want in the tabstrip, but loading the first one only allow me to see the first one.
I'm using Kendo 2013.1.514, on Windows 7 64bits, and Chrome 28.0.1500.72 m
Here's my code for building the tabstrip:
01.@{
02.    ViewBag.Title = "";
03.    Layout = "~/Views/Shared/_AdminLayout.cshtml";
04.}
05.<div class="span9">
06.    <div id="list-wrapper">
07.        <div class="k-content">
08.           <div id="tabStrip"></div>
09.        </div>
10.    </div>
11.</div>
12. 
13.<script>
14.    $(document).ready(function () {
15.        var data = new kendo.data.DataSource({
16.            type: "json",
17.            transport: {
18.                read: {
19.                    type: "POST",
20.                    url: "@Url.Action("RequestTabs")/",
21.                    dataType: "json",
22.                    contentType: "application/json; charset=utf-8",
23.                    error: function (xhr, ajaxOptions, thrownError)
24.                    {
25.                        alert("error " + xhr.responseText);
26.                    }
27.                }
28.            }
29.        });
30. 
31.        $("#tabStrip").kendoTabStrip({
32.            dataTextField: "Text",
33.            dataContentUrlField: "ContentUrl",
34.            dataSource: data
35.        });
36.        //$("#tabStrip").data("kendoTabStrip").select()
37.    });
38.</script>
Here's my code for the pages :
01.<div id="GridTD"></div>
02. 
03.<script id="rowTemplate" type="text/x-kendo-template">
04.    <tr>
05.        <td>
06.            #: ModuleName #
07.        </td>
08.    @foreach (AccessModel access in Model.access)
09.    {
10.        <text>
11.            <td id="Active-#: @Html.Raw("Acc"+access.AccessID.ToString()) #">
12.            </td>
13.        </text>
14.    }  
15.    </tr>
16.</script>
17. 
18.<script>
19.    $(document).ready(function () {
20. 
21.        var columnSchema = [];
22.        columnSchema.push({ field: "ModulID", hidden: true });
23.        columnSchema.push({ field: "ModuleName" });
24.        @foreach (AccessModel access in Model.access)
25.        {
26.            <text>
27.        columnSchema.push({ field: "@access.AccessName" });
28.            </text>
29.        }
30.         
31.        var data = new kendo.data.DataSource({
32.            type: "json",
33.            transport: {
34.                read: {
35.                    type: "POST",
36.                    url: "@Url.Action("RequestTabGroup")/@Model.ID",
37.                    dataType: "json",
38.                    contentType: "application/json; charset=utf-8",
39.                    error: function (xhr, ajaxOptions, thrownError)
40.                    {
41.                        alert("error " + xhr.responseText);
42.                    }
43.                }
44.            },
45.            schema: {
46.                data: "TabGroup",
47.                model: {
48.                    fields: {
49.                    }
50.                },
51.                total: function (response) {
52.                    return $(response.TabGroup).length;
53.                }
54.            },
55.            pageSize: 12
56.        });
57. 
58.        $("#GridTD").kendoGrid({
59.            dataSource: data,
60.            columns: columnSchema,
61.            sortable: true,
62.            pageable: true,
63.            rowTemplate: kendo.template($("#rowTemplate").html())
64.        });
65.    });
66.</script>
Feel free to ask me more source code if something is missing.

PS : I'm using template to style my row, but i can't make a "border" for more visibility (like in excel). Is there something to add to the <tr> to make this change ?

Thanks in advance for your answer.
Shimon
Top achievements
Rank 2
 answered on 18 Jul 2013
1 answer
75 views
Hi,

please have a look at my forum post:
http://www.kendoui.com/forums/permalink/boGRRa6aG2OF1P8AAFTdxQ

 I posted it in the wrong category. Its actually ASP.NET MVC 4! If somebody could move it to this forum, that would be great.

Regards,
Marcus
Marcus
Top achievements
Rank 2
 answered on 17 Jul 2013
2 answers
41 views
Hi

How can I go about posting the grid back to my controller with the filtered results?

I basically have a filterable grid and a button which need to handle the data from the grid, but only the filtered results using the built-in filtering functions.

Thanks
Johan
Top achievements
Rank 1
 answered on 17 Jul 2013
3 answers
427 views
The edit functionality of the grid is not working out for me... 
I have come up with an ajax action link but would like to style it the same as the edit button without it firing the edit. 

so far I have this but it produces one icon in the button and one outside of the button and there is no text, How can I recreate the edit button without it firing the default edit command of the grid?

<a class='k-button k-button-icontext' data-ajax='true' data-ajax-mode='replace' data-ajax-method='Get' data-ajax-update='\\#editorform'  href='/FallsAssessment/Edit?EventID=#=EventID #' data-ajax-success='showModal'><span class='k-icon k-i-pencil'/>Edit</a>
Thanks 

David 
David
Top achievements
Rank 1
 answered on 17 Jul 2013
8 answers
1.4K+ views
Hi,

Just downloaded 2013.1.319.340 and am receiving the following error when using the menu:

"The method or operation is not implemented".

(StackTrace)
[NotImplementedException: The method or operation is not implemented.]
   System.Web.HttpRequestBase.get_HttpMethod() +29
   System.Web.Routing.<>c__DisplayClass3.<Match>b__0(String method) +25
   System.Linq.Enumerable.Any(IEnumerable`1 source, Func`2 predicate) +146
   System.Web.Routing.HttpMethodConstraint.Match(HttpContextBase httpContext, Route route, String parameterName, RouteValueDictionary values, RouteDirection routeDirection) +164
   System.Web.Routing.HttpMethodConstraint.System.Web.Routing.IRouteConstraint.Match(HttpContextBase httpContext, Route route, String parameterName, RouteValueDictionary values, RouteDirection routeDirection) +22
   System.Web.Routing.Route.ProcessConstraint(HttpContextBase httpContext, Object constraint, String parameterName, RouteValueDictionary values, RouteDirection routeDirection) +56
   System.Web.Routing.Route.ProcessConstraints(HttpContextBase httpContext, RouteValueDictionary values, RouteDirection routeDirection) +100
   System.Web.Routing.Route.GetRouteData(HttpContextBase httpContext) +178
   System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +233
   Kendo.Mvc.Infrastructure.Implementation.RouteDataCache.RouteDataFactory(String url) +59
   Kendo.Mvc.Infrastructure.Implementation.<GetRouteData>c__AnonStorey1B.<>m__26() +13
   Kendo.Mvc.Infrastructure.Implementation.NoCache.Get(String key, Func`1 defaultValueFactory) +11
   Kendo.Mvc.Infrastructure.Implementation.RouteDataCache.GetRouteData(String key, String url) +98
   Kendo.Mvc.Infrastructure.Implementation.AuthorizationContextCache.GetAuthorizationContext(RequestContext request, String controllerName, String actionName, RouteValueDictionary routeValues) +362
   Kendo.Mvc.Infrastructure.Implementation.ControllerAuthorization.IsAccessibleToUser(RequestContext requestContext, String controllerName, String actionName, RouteValueDictionary routeValues) +55
   Kendo.Mvc.Infrastructure.Implementation.NavigationItemAuthorization.IsAccessibleToUser(RequestContext requestContext, INavigatable navigationItem) +186
   Kendo.Mvc.UI.NavigatableExtensions.IsAccessible(INavigatable item, INavigationItemAuthorization authorization, ViewContext viewContext) +29
   Kendo.Mvc.UI.NavigationItemContainerExtensions.WriteItem(TItem item, TComponent component, IHtmlNode parentTag, INavigationComponentHtmlBuilder`1 builder) +197
   Kendo.Mvc.UI.<WriteHtml>c__AnonStorey76.<>m__247(MenuItem item) +24


(rest omitted for brevity)

The code is as follows:
@(Html.Kendo().Menu()
 .Name("mn-case")
 .Items(items =>
 {
items.Add().Text("Dashboard").Action("Index", "Dashboard", new { caseId = caseId, area="Case" });
}))
The route is defined as follows:
context.MapRoute("CaseIndex",
               "Case/{caseId}/{controller}",
               new { action = "Index"},
               new RouteValueDictionary { { "httpMethod", new HttpMethodConstraint("GET") }}
               );
This did not happen in previous versions and the workaround is to use Url.Action as follows:
items.Add().Text("Dashboard").Url(@Url.Action("Index", "Dashboard", new { caseId = caseId, area="Case" }));
I have many projects that use the menu and do not want to have to change them all.  Is this a problem on my end or is it Kendo?

Thank you,
David Adams

xclirion
Top achievements
Rank 1
 answered on 17 Jul 2013
2 answers
127 views
Hello,

I'm trying to migrate a panel bar from MVC extensions to Kendo. When the Panel bar loads, I expand specific items via a initialization script.
What I find is that if I call

var panelbar = $("#PanelBar").data("kendoPanelBar");

in $(document).ready() as adviced as in

http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/migration/widgets/panelbar, I get a null object.
This call however succeeds to get the correct object if called later.
Since, onLoad() is removed in Kendo, is there any other way I can initialize my Panelbar ?

Kind Regards

Achilles
Achilles
Top achievements
Rank 1
 answered on 17 Jul 2013
1 answer
140 views
I have a grid with a change event. When the change event is invoked a redirect takes place towards another page.
I want to add a column with a checkbox which does not cause the change event to be fired. The other columns must still cause the change event to be fired.
How can this be done?

The same is valid for the listview. I have a listview with a client template and I need to show a checkbox which doesn't cause the change event to be fired.
Dimo
Telerik team
 answered on 17 Jul 2013
1 answer
381 views
Hi,
I couldn't find any example of how to attach datasource events such as requestStart, requestEnd, or error using the Mvc Grid Helper.  Can it be done?
Dimiter Madjarov
Telerik team
 answered on 17 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?