Telerik Forums
Kendo UI for jQuery Forum
4 answers
361 views
Hi!
I have 2 datasources: for multiselect and for dropdownlist, and 1 datasource for insert data into db from multiselect and dropdownlist.
But as result i have new record in database: id_client: blank and id_board: (needed value).
When i do "alert(required.value() + optional.value() )" i getting needed values. Why is blank posted data in field "id_client"?


 var required = $("#multiclients").data("kendoMultiSelect");<br>            var optional = $("#ddrecord").data("kendoDropDownList");<br><br><br>            $("#mrecord").click(function() {<br>             alert(required.value() + optional.value() );<br>         var dataa = {id_client: required.value(), id_board: optional.value()};<br>        dataSR.add(dataa);<br>         dataSR.sync();<br>  }); 
Jack
Top achievements
Rank 1
 answered on 09 Feb 2014
0 answers
111 views
**** I WAS INCORRECT IN MY ASSUMPTION THAT DATA WAS LOST WHILE SCROLLING.  PLEASE DISCARD THIS POST.

I have a grid in cell editing mode with virtual scrolling with a dataSource using batch updates.  When the virtual scrolling requires new data to be fetched from the server, any unsaved changes to the current data are lost.  That makes sense because the dataSource is only maintaining a portion of the total data at any given scroll position.

I would like to present the use with a message like "You need to save changes before scrolling any more..." and give them the opportunity to either save or cancel the existing changes or simply stop the scrolling until the either save or cancel.

I tried binding to the requestStart event that is triggered by the dataSource's undocumented prefetch method that is called while virtual scrolling.  I can prevent the new data from being fetched by calling event.preventDefault() in the handler but the grid is left in a disabled state via a kendo progress indicator that was initiated somewhere along the way.

The relevant code in kendo-ui that I've been examining include VirtualScrollable._scroll() and DataSource.prefetch().

Q: Is there a more elegant way of doing this?  I know I could use paging and have more control but virtual scrolling is just much cooler IMO.

Thanks
Mark
Top achievements
Rank 1
 asked on 09 Feb 2014
9 answers
3.3K+ views
I have a requirement to disable the ComboBox under certain conditions (or make readOnly). Part of the requirement is the appearance of the ComboBox; the dispaly area must have a light Grey background and the Text must be black. However, while I can make the background lightgray, nothing I do works for setting the text to Black.

I also have the same problem with DatePicker widgets.

So how do I go about keeping the text color black when the a widget is disabled?
Keith
Top achievements
Rank 1
 answered on 08 Feb 2014
3 answers
238 views
Hi,

we want to change the title in navbar according to some global variables.
after navigating to another application page via app.navigate('ksettings.html') it's not possible to call title method of the navbar, eg.

$("#photonavbar").data("kendoMobileNavBar").title( g_models.ParamsVM.valSpecNames.join(' ' ) );

because $("#photonavbar").data("kendoMobileNavBar") is undefined.
Event indicating all kendo structures are initiated would be usefull.

How to track that page was succesfully navigated and all kendo structures are instantiated?

Thanks in advance
Brandon Peterson
Top achievements
Rank 2
 answered on 07 Feb 2014
5 answers
152 views
Hi, I have the following problem, and I do not know how to solve: 


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 37: columns.ForeignKey(pozos => pozos.IdCatPlataforma, (IEnumerable<KendoGridAjaxEditing.Models.CatPlataforma>)ViewData["CatPlataforma"], dataFieldValue: "Id", dataFieldText: "Nombre");
Línea 38: columns.Bound(pozos => pozos.Descripcion).Width(250);
Línea 39: columns.Command(commands =>
Archivo de origen: c:\Users\GMayaS\Documents\Visual Studio 2013\Projects\KendoGridAjaxEditing\KendoGridAjaxEditing\Views\Home\Index.cshtml    Línea: 37

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) +361238
System.Web.Mvc.SelectList..ctor(IEnumerable items, String dataValueField, String dataTextField) +19
Kendo.Mvc.UI.Fluent.GridColumnFactory`1.ForeignKey(Expression`1 expression, IEnumerable data, String dataFieldValue, String dataFieldText) +69
ASP._Page_Views_Home_Index_cshtml.<Execute>b__11(GridColumnFactory`1 columns) in c:\Users\GMayaS\Documents\Visual Studio 2013\Projects\KendoGridAjaxEditing\KendoGridAjaxEditing\Views\Home\Index.cshtml:37
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\KendoGridAjaxEditing\KendoGridAjaxEditing\Views\Home\Index.cshtml:27
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197
System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +97
System.Web.WebPages.StartPage.RunPage() +17
System.Web.WebPages.StartPage.ExecutePageHierarchy() +62
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +76
System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +260
System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +115
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +295
System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +23
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +242
System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +21
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +177
System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +89
System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +102
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +57
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +43
System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +57
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +47
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +25
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23
System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +47
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9514812
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

Información de versión: Versión de Microsoft .NET Framework:4.0.30319; Versión ASP.NET:4.0.30319.18408             
Gab
Top achievements
Rank 1
 answered on 07 Feb 2014
1 answer
173 views
Scenario:

Kendo control is in a partial view.

Page loads to homepage, no kendo control.

User clicks to view that has a kendo control, we pull that partial view down and inject it into the container.

Some kendo controls do not load at all (calender), and in the scheduler's case, does not render the scheduled events.

I've tried using the deferred feature then calling Kendo().DeferredScripts(), but that only results in the scheduler not rendering at all.

The grid renders fine when dynamically injected, however.

The deferred feature documentation says the default functionality is for the control's initialization scripts to fire immediately after the control is rendered. If this is the case then injecting a partial view with kendo controls within should not be a problem.

However, all of the controls that I've tested work fine when they are rendered during page load, but only the grid works as expected when injected after page load.

Dimo
Telerik team
 answered on 07 Feb 2014
2 answers
92 views
I'm using a Kendo Mobile View and I've set the data-zoom attribute to true ("data-zoom = true") so that my view can Pinch and Zoom. 

Is there an attribute or css style that I can set to limit the size in which the Pinch and Zoom resizes the contents? I want to set a max and min size. 

I want to make my view so that it can zoom in but I want to constrain the view so that it doesn't get smaller than 100% of the viewport width. I like to set the min-width equal to the viewport width in some way. How do you do this?

Any help would be greatly appreciated. 


Rodney
Top achievements
Rank 2
 answered on 07 Feb 2014
2 answers
84 views
Hi,
We have the following datasource
var messages = new kendo.data.DataSource({
    transport: {
        read: function(operation) {
            var cachedData = localStorage.getItem("cachedMessages");
            if (cachedData != null || cachedData != undefined) {
                operation.success(JSON.parse(cachedData));
            }
            else {
                operation.success(getMessages());
            }                
        }
    }       
});
I only want it to hit the server "getMessagesFromServer()" if there is no cache (which is working) or when the user "pulls to refresh" in the listview e.g.
<ul id="messages-list-view" data-role="listview" data-source="messages" data-template="message-template" data-pull-to-refresh="true">
</ul>
How can I tell messages.read that the user has forced a refresh and it needs to go to the server to get the data rather than the cache.

Thanks in advance

Eaigs

Thomas
Top achievements
Rank 1
 answered on 07 Feb 2014
4 answers
103 views
I have an issue where I have a scheduler which extends off the bottom of the page and when you click on it, the whole page shifts up, so that the top, left corner of the calendar is at the top of the page.  Is there a way to prevent the page from shifting?

When you double-click to bring up the editor, it ends up opening at the wrong time slot, because it shifted between clicks.
Cyndie
Top achievements
Rank 1
 answered on 07 Feb 2014
1 answer
257 views
Please see that attached.  We have a few donut charts and want the labels on them.  We have done what we can to reduce the size, but the labels and chart title still seem to get cut off (see attached pictures).  This is in a responsive UI, and it seems the labels are not always counted when using the "$(this).data("kendoChart").redraw()" method.


$("#" + chartDiv).kendoChart({
                   title: {
                       text: chartName + " " + chartLabel
                   },
                   legend: {
                       visible: false,
                       position: "bottom"
                   },
                   seriesDefaults: {
                       type: "donut",
                       startAngle: 150
                   },
                   theme: defaultTheme,
                   series: [{
                       name: "Prior Period",
                       overlay: { gradient: "none" },
                       categoryField: "Value.Description",
                       field: "Value.Value",
                       tooltip: {
                           visible: true,
                           template: "${dataItem.Value.Description} - ${dataItem.Value.FormattedValue} - Prior Period"
                       },
                       data: jsonPrior
                   }, {
                       name: labelDateRange,
                       overlay: { gradient: "none" },
                       categoryField: "Value.Description",
                       field: "Value.Value",
                       tooltip: {
                           visible: true,
                           template: "${dataItem.Value.Description} - ${dataItem.Value.FormattedValue} - " + labelDateRange
                       },
                       data: jsonData,
                       labels: {
                           template: "${dataItem.Value.Description} - ${dataItem.Value.FormattedValue}",
                           position: "outsideEnd",
                           font: "10px Arial,Helvetica,sans-serif",
                           align: "circle",
                           visible: true,
                           distance: 15,
                           background: "transparent"
                       },
                   }]
               });
Iliana Dyankova
Telerik team
 answered on 07 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?