Telerik Forums
Kendo UI for jQuery Forum
4 answers
184 views
I am new to Kendo UI Mobile. I currently have a Kendo UI SPA application for desktop browsers and I intend to build an accompanying Kendo UI Mobile application for a subset of the functionality that is available in the SPA app for desktop browsers.

The SPA desktop app allows deep linking into the app using routes. The SPA desktop app sends emails containing hyperlinks that deep link into the app to allow approvers to approve or reject a record for which they received an email.

When the server detects that the browser is a mobile app the server will redirect to the mobile page with the same route.

Here is my first problem: it does not appear you can deep link into a Kendo UI Mobile app using the same routes as a Kendo UI SPA app. A Kendo UI SPA app may have a route #/requests/:id/edit whereas a Kendo UI Mobile app would require a route #editRequest?:id which uses querystring parameters. What a shame Kendo UI SPA and Kendo UI Mobile have incompatible routing mechanisms.

Can anybody give guidance on how the Mobile app can intercept routes and convert the route from Kendo UI SPA format to Kendo UI Mobile format where applicable? Also, as the Kendo UI Mobile app will only support a subset of the functionality that is available in the Kendo UI SPA app, a lot of routes will be missing from the Kendo UI Mobile app. Is there an event to handle missing routes in a Kendo UI Mobile app so that I can present a friendly message to the user?

many thanks

Remco
Petyo
Telerik team
 answered on 06 Feb 2014
3 answers
86 views
In the demo at
http://demos.telerik.com/kendo-ui/web/scheduler/index.html

remove some events to leave space for the error reproduction.

Keep at least one non-recurring event, drag it to for instance a tuesday and edit it by double clicking.

Let it be three days long.

When you have set the event lenght and the edit dialog is closed, it will display as a three day long event.

Drag it towards the end of the week, when it dragged so it starts on a friday, the event will only display on friday and saturday. Sunday will be missing.

If you drag to so it starts on the saturday, it will display correctly, occupying saturday, sunday (next week) and monday (next week).
Vladimir Iliev
Telerik team
 answered on 06 Feb 2014
1 answer
123 views
Can anyone tell me what I'm doing wrong?

See the attached file.


Error de servidor en la aplicación '/'.El valor no puede ser nulo.
Nombre del parámetro: items Descripción: Excepción no controlada al ejecutar la solicitud Web actual. Revise el seguimiento de la pila para obtener más información acerca del error y dónde se originó en el código.

Detalles de la excepción: System.ArgumentNullException: El valor no puede ser nulo.
Nombre del parámetro: items

Error de código fuente:

Línea 16: columns.Bound(e => e.Id).Visible(false);
Línea 17: columns.Bound(e => e.Nombre).Width("Auto");
Línea 18: columns.ForeignKey(e => e.IdPuesto, (System.Collections.IEnumerable)ViewData["puesto"], "Id", "Nombre")
Línea 19: .Title("Puesto").Width("Auto");

Línea 20: columns.ForeignKey(e => e.IdDepartamento, (System.Collections.IEnumerable)ViewData["departemento"], "Id", "Nombre")
Archivo de origen: c:\Users\GMayaS\Documents\Visual Studio 2013\Projects\KendoUIMvcApplicationGMayaS\KendoUIMvcApplicationGMayaS\Views\Home\Index.cshtml    Línea: 18

Seguimiento de la pila:

[ArgumentNullException: El valor no puede ser nulo.
Nombre del parámetro: items]
System.Web.Mvc.MultiSelectList..ctor(IEnumerable items, String dataValueField, String dataTextField, IEnumerable selectedValues) +97
System.Web.Mvc.SelectList..ctor(IEnumerable items, String dataValueField, String dataTextField, Object selectedValue) +100
System.Web.Mvc.SelectList..ctor(IEnumerable items, String dataValueField, String dataTextField) +45
Kendo.Mvc.UI.Fluent.GridColumnFactory`1.ForeignKey(Expression`1 expression, IEnumerable data, String dataFieldValue, String dataFieldText) +70
ASP._Page_Views_Home_Index_cshtml.<Execute>b__c(GridColumnFactory`1 columns) in c:\Users\GMayaS\Documents\Visual Studio 2013\Projects\KendoUIMvcApplicationGMayaS\KendoUIMvcApplicationGMayaS\Views\Home\Index.cshtml:18
Kendo.Mvc.UI.Fluent.GridBuilder`1.Columns(Action`1 configurator) +144
ASP._Page_Views_Home_Index_cshtml.Execute() in c:\Users\GMayaS\Documents\Visual Studio 2013\Projects\KendoUIMvcApplicationGMayaS\KendoUIMvcApplicationGMayaS\Views\Home\Index.cshtml:11
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +271
System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +120
System.Web.WebPages.StartPage.RunPage() +63
System.Web.WebPages.StartPage.ExecutePageHierarchy() +100
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +131
System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +695
System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +382
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +431
System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +39
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +116
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +529
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +106
System.Web.Mvc.Async.<>c__DisplayClass28.<BeginInvokeAction>b__19() +321
System.Web.Mvc.Async.<>c__DisplayClass1e.<BeginInvokeAction>b__1b(IAsyncResult asyncResult) +185
System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +133
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +56
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +40
System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +34
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +70
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +139
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +44
System.Web.Mvc.Controller.<BeginExecute>b__15(IAsyncResult asyncResult, Controller controller) +39
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +62
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +139
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +39
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +39
System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__4(IAsyncResult asyncResult, ProcessRequestState innerState) +39
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +70
System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +139
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +40
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +38
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9514812
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Petur Subev
Telerik team
 answered on 06 Feb 2014
1 answer
181 views
I have a very simple example setup where I want to change a viewmodel value inside a function using click binding. It looks like the viewmodel value is getting changed but the view is never updated.

Here is the example:

http://jsfiddle.net/MuFP5/2/
Paul
Top achievements
Rank 1
 answered on 05 Feb 2014
1 answer
283 views
I'm working on an application that will use the Grid to display data and allow a user to modify the data using CRUD methods within the grid. It is connected to a DataSource that sends the data to a MVC4 controller method to perform some calculations.

My grid has InCell editing mode and contains code that will call an AJAX function as soon as the updated cell loses focus. There is no update button. The AJAX function calls an MVC4 controller method.

When i click on a cell in the first row and update it's value, the AJAX function calls the controller method. the calculations take place correctly. the grid looks fine.
but when i click on a cell in any row except the first row and update it's value, the AJAX function calls the controller method. the calculations take place correctly. but the updated row is replaced by the first row. This happens for any row number. no exceptions. 

But when I click on the grid "refresh" button, The grid values are readjusted and all the rows look good again with correct values.

I use the "datasource.Sync" event for my gridcell lost focus editing.
I thought that the Sync event will automatically perform the Read operation for grid. is it not so?

My code is as follows:   @(Html.MyGrid<ViewModels.ReportCalc>("AddNewPayrollGrid", AddBtnAccess, "Add Payroll Details", EditBtnAccess, GridEditMode.InCell)
                            .Columns(columns =>
                            {
                                columns.Bound(p => p.PayrollClassSuffixid).Hidden();
                                columns.Bound(p => p.PayrollCode).Title("Class Code").Width(60);                               
                                columns.Bound(p => p.Description).Title("Description").Width(250);
                                columns.Bound(p => p.PayrollPeriodDate).Title("Payroll Period").Width(100);                              
                                columns.Bound(p => p.NumberofFulltimeEmployees).ClientTemplate("<div style= 'text-align:right;'>#=NumberofFulltimeEmployees#</div>").Title("Number Of<Br>Full time<Br>Employees").Width(60);
                                columns.Bound(p => p.NumberofParttimeEmployees).ClientTemplate("<div style= 'text-align:right;'>#=NumberofParttimeEmployees#</div>").Title("Number Of<Br>Part time <Br>Employees").Width(60);
                                columns.Bound(p => p.NumberOfEvents).ClientTemplate("<div style= 'text-align:right;'>#=NumberOfEvents#</div>").Title("Number of<Br> Events").Width(60);
                                columns.Bound(p => p.Payrollamount).Format("{0:C}").ClientTemplate("<div style= 'text-align:right;'>#=Payrollamount#</div>").Title("Payroll($)").Width(60);
                                columns.Bound(p => p.CoverageDays).ClientTemplate("<div style= 'text-align:right;'>#=CoverageDays#</div>").Title("Coverage<Br>Days").Width(60);
                                columns.Bound(p => p.Premium).ClientTemplate("<div style= 'text-align:right;'>#=Premium#</div>").Title("Premium($)").Width(100);
                              
                            })
                          
                            .Pageable()
                            .Sortable()
                            .Navigatable()                           
                            .TableHtmlAttributes(new { @class = "KendogridTable" })
                            .DataSource(dataSource => dataSource
                            .Ajax()
                            .ServerOperation(false)
                            .PageSize(5)
                            .Batch(true)                              
                            .Model(model => 
                                {
                                    model.Id(p => p.PayrollClassSuffixid);
                                    model.Field(payr => payr.PayrollCode).Editable(false);
                                    model.Field(payr => payr.Description).Editable(false);
                                    model.Field(payr => payr.PayrollPeriodDate).Editable(false);
                                    model.Field(payr => payr.InterimRate).Editable(false);
                                    model.Field(payr => payr.Premium).Editable(false);
                                })                               
                                 .Read(read => read.Action("Payroll_Read", "MyController", new { PN= some value}))
                               .Create(create => create.Action("Payroll_Create", "MyController").Data("PN"))
                                .Update(update => update.Action("Payroll_Update", "MyController", new {PolicyNumber = Model.PolicyNumber}))
                                )
                                 
                                        .Events(ev => ev.Save(@"function(e){ 
                    setTimeout(function(){
                        $('#AddNewPayrollGrid').data('kendoGrid').dataSource.sync()   
                                              
                    }
            )}"))
                             
                              .Events(e => e.DataBound("onDataBinding"))
                            
                              )

can anyone tell me what I am doing wrong here.
Also, I tried adding the RequestEnd event to the grid as follows:  
.Events(e =>  e.RequestEnd("onRequestEndForGrid"))

but the view fails to recognise the RequestEnd event. I get a message saying "GridEventBuilder does not contain a definition for RequestEnd". Can you tell me if I am missing anything here.
                              





Petur Subev
Telerik team
 answered on 05 Feb 2014
1 answer
100 views
I'm experiencing a weird issue that has a couple of us stumped. We have created a scrollview that pulls some images via a JSON file. The scrollview works well with the images loading correctly, however, on the initial load, the pager does not display at the bottom of the screen. The <ol class="km-pages"> is empty, with no list items. If I navigate off the page and then back onto to it, the pager appears at the bottom of the page as it should. This occurs in Chrome, IE and Firefox, so there is obviously something weird with the code. I have attached the two files as reference. Any help is greatly appreciated.
Alexander Valchev
Telerik team
 answered on 05 Feb 2014
3 answers
221 views
http://jsbin.com/emuqazEz/3/edit

I have tested in IE9 & IE11.  Filters do not work on grid at all.  Any ideas?

Colby
Dimiter Madjarov
Telerik team
 answered on 05 Feb 2014
2 answers
366 views
Hi,

I am trying to set the background image for the chart. I am referring the example http://demos.telerik.com/kendo-ui/dataviz/bar-charts/column.html 

and added copied the same code into my example, still it is not displaying the .png image as background image. It seems that the chart area is not transparent. I see the background image on chart in demo link above, but not on the chart I created. I am testing it on IE 9.  

I am using the Kendo UI version 2013.3.1316

I am attaching my test application. ( I removed dlls from bin folder and script folder to match .zip size for Upload )

My code is on Index.aspx.
Prashant
Top achievements
Rank 1
 answered on 05 Feb 2014
5 answers
109 views
When trying to create a Telerik MVC 4 project I get a Package Installation Error. I saw this link, http://www.telerik.com/support/kb/orm/general/error-could-not-load-packages-to-project.aspx but I chose the option to skip creating a  OpenAccess Model Library Project. So I don't need to create an ORM.

Error message attached.
Missing User
 answered on 05 Feb 2014
1 answer
114 views
What happened to the Kendo UI MVC Application template? I used to have this option when I was creating a new project.
Missing User
 answered on 05 Feb 2014
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?