Telerik Forums
Kendo UI for jQuery Forum
1 answer
156 views
Hello,

how do i bind an array in my js code to a html ul element.

This is my element: 
<ul id="attendees"></ul>

this is my template:
<script type="text/x-kendo-tmpl" id="tml_attendees">
     <img src="${url}">
</script>

i dont want to use an kendoMobileListView


Kiril Nikolov
Telerik team
 answered on 06 Feb 2014
1 answer
135 views
Forgive me if this has been answered or if it's something really elementary.  I'm not a very strong developer for mobile web...

When I view the KendoUI mobile demos using my iPhone (iOS 7.0.4), the browser's Navigation and Tab bars (top and bottom) don't retract, leaving a significant amount of vertical space unusable and detracting from the otherwise app-like appearance of the demo.

Other web pages, including those not optimized for mobile, don't have this problem.  The bars retract on only reappear on a swift swipe up on the page.

Is this behavior intentional - and is there any way to 'fix' or change it?

Thanks!
Kiril Nikolov
Telerik team
 answered on 06 Feb 2014
2 answers
259 views
I have a grid that uses the same template for editing and creating a new user record.
Everything works fine when editing but for some reason when creating a new user the lanuageId is not being returned when posting the data back.

All of the other fields are binding fine but no matter what the value selected in the dropdownlist the value 0 is being returned.
 
@(Html.Kendo().DropDownListFor(m => m.LanguageId)
                  .DataTextField("Name") //Specifies which property of the Product to be used by the dropdownlist as a text.
                  .DataValueField("Id") //Specifies which property of the Product to be used by the dropdownlist as a value.
                  .HtmlAttributes(new { @class = "form-control" })
                  .DataSource(source => source.Read(read => read.Action("GetLanguageValues", "Account")))

The form works perfectly fine when editing.

What am I doing wrong?
Benjamin
Top achievements
Rank 1
 answered on 06 Feb 2014
3 answers
269 views
Since header and footer take a lot of mobile app screen, would it be possible to hide footer when user starts scrolling down and display it back on scrolling up?
Kiril Nikolov
Telerik team
 answered on 06 Feb 2014
1 answer
137 views
How do I access datastore and/or global objects from within template?
Vladimir Iliev
Telerik team
 answered on 06 Feb 2014
4 answers
257 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
109 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
158 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
226 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
362 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
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Drag and Drop
Application
Map
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
DropDownTree
ListBox
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
LLM Kit
+? 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?