Telerik Forums
Kendo UI for jQuery Forum
3 answers
203 views
I'm getting data from a remote like so:

var dataSourceStatistics = new kendo.data.DataSource({
    transport: {
        read: {
            data: {
                f:'getCustomerStats',
                fromDate:function () {
                    return "2012-01-01";
                },
                toDate:function () {
                    return "2012-06-19";
                },
                custStats:null
            }
        },
        update: {
 
        }
    },
    schema: {
        data: function(data) {
            return data.result.custStats.Record;
        },
        total: function(data) {
            return data.result.custStats.Record.length;
        },
        model:{
            id: "EmployeeId",
            fields: {
                Employee: {
                    editable: false
                },
                EmployeeId: {
                    editable: false
                },
                ValueCandE: {
                    type: "number",
                    defaultValue: 0
                },
                ValueE: {
                    type: "number",
                    defaultValue: 0
                },
                ValueEandCandM: {
                    type: "Number"
                },
                ValueEandM: {
                    type: "Number"
                }
            }
        }
    }
});

The remote data does not always contain the ValueE and ValueCandE fields.
Currently, all the missing fields show up as null in the models.

Why doesn't the DataSource respect my default values?
Petur Subev
Telerik team
 answered on 22 Oct 2013
1 answer
2.3K+ views
I have a very simple strongly typed datasource that consists of Bills:
public class BillName
    {
        public string Bill { get; set; }
    }

And a very simple test case that returns these bills through a WebApi in MVC:

var dataSource = new kendo.data.DataSource({
            transport: {
                read: {
                    url: "/api/NavBillApi/GetAllBills",
                }
            }
        });
        
        $('#searchBills').kendoAutoComplete({
            dataSource: dataSource,
            filter: "startswith",
            dataText: "Bill",
            minLength: 1,
            //ignoreCase: false,
            placeholder: "Select ...",
        });

[HttpGet]
        public IEnumerable<BillName> GetAllBills()
        {
            var billList = _billsService.GetAllBillNames();
            //var x = billList.Count();
            return billList.AsEnumerable();
        }

I have tried every option on the datasource and AutoComplete widgets that I have found in the documentation.  If I uncomment ignoreCase: false, then I get the error: Uncaught TypeError: Object [object Object] has no method 'lastIndexOf'.
I am out of ideas.  Thanks for any help.
Georgi Krustev
Telerik team
 answered on 22 Oct 2013
1 answer
214 views
When I try to page using ToDataSourceResult using an IQueryable from Entity Framework 5.0 I receive the exception below. I hope I wasn't doing something dumb but I did not find anything in the ToDataSource documentation that would suggest otherwise.


The method 'Skip' is only supported for sorted input in LINQ to
Entities. The method 'OrderBy' must be called before the method 'Skip'.

System.NotSupportedException

The
method 'Skip' is only supported for sorted input in LINQ to Entities.
The method 'OrderBy' must be called before the method 'Skip'.

System.NotSupportedException: The method 'Skip' is only supported for sorted input in LINQ to Entities. The method 'OrderBy' must be called before the method 'Skip'.
at System.Data.Objects.ELinq.ExpressionConverter.OrderByLifter.PassthroughOrderByLifter.Skip(DbExpression k)
at System.Data.Objects.ELinq.ExpressionConverter.OrderByLifter.Skip(DbExpressionBinding input, DbExpression skipCount)
at System.Data.Objects.ELinq.ExpressionConverter.Skip(DbExpressionBinding input, DbExpression skipCount)
at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SkipTranslator.TranslatePagingOperator(ExpressionConverter parent, DbExpression operand, DbExpression count)
at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.PagingTranslator.TranslateUnary(ExpressionConverter parent, DbExpression operand, MethodCallExpression call)
at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.UnarySequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call)
at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod)
at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq)
at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.UnarySequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call)
at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.SequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod)
at System.Data.Objects.ELinq.ExpressionConverter.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq)
at System.Data.Objects.ELinq.ExpressionConverter.TypedTranslator`1.Translate(ExpressionConverter parent, Expression linq)
at System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq)
at System.Data.Objects.ELinq.ExpressionConverter.Convert()
at System.Data.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Data.Entity.Internal.Linq.InternalQuery`1.GetEnumerator()
at System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.IEnumerable.GetEnumerator()
at Kendo.Mvc.Extensions.QueryableExtensions.Execute[TModel,TResult](IQueryable source, Func`2 selector)
at Kendo.Mvc.Extensions.QueryableExtensions.CreateDataSourceResult[TModel,TResult](IQueryable queryable, DataSourceRequest request, ModelStateDictionary modelState, Func`2 selector)
at Kendo.Mvc.Extensions.QueryableExtensions.ToDataSourceResult(IQueryable enumerable, DataSourceRequest request)
at AGP.Controllers.DocumentController.CompSalesGrid(DataSourceRequest request, ComparableManagementSaleSearchTerms search) in c:\Code\AGP\Main\AGP\Controllers\DocumentController.cs:line 1603
at lambda_method(Closure , ControllerBase , Object[] )
Rosen
Telerik team
 answered on 22 Oct 2013
1 answer
106 views
I found this http://jsfiddle.net/bDvkQ/ which does a great job of making the combo into a checked combo box but you have to click on the checkbox to select the items.  I would like to have it select the item if I click on the text as well.

Any ideas on how to adapt it to support this?

Thanks,
Elliot
Georgi Krustev
Telerik team
 answered on 22 Oct 2013
3 answers
143 views
Hi,

I've found the need to style my gauges somewhat "outside" the scope of your documentation (At least as far as I could see). I'm trying to style the scale it self, both in the linear and radial gauges. What I'm trying to achieve is a border along the edges, as can be seen in the attachments (These are custom styled Telerik components by the way). Is this at all possible with the Kendo equivalent components?

Also, is it possible to style the pointer of the radial gauge, to look more like the one in the attached image? I know there's probably alot of custom css to be done here, but I find it really neccesary to be able to do this.

Best regards,
Nicklas
Iliana Dyankova
Telerik team
 answered on 22 Oct 2013
2 answers
159 views
Hello,
I'm part of a team rewriting the UI of a heavy desktop ASP.Net application using kendo components.
One of the objectives is to have a multibrowser and multiplatform (desktop + mobile) application.
Currently I'm using kendo 2013.2.716 version.
I tried the application on Ipad with Safari as browser. 
I included as scripts kendo.all.min.js and as stylesheet kendo.mobile.all.min.css.

I got stuck on the first page as the original application uses menus that I converted to kendo menus. This worked satisfactorily on desktop but failed miserably on Ipad since the menu was rendered as pure
html.The menu has the familiar shape with a couple of levels.
See enclose image below.

How can I convert menus in the mobile environment ? 
I saw the list of mobile widgets and no menu exists.
What could be a workaround to reproduce the menu functionality without writing a new
application from scratch ?

I'll be grateful for any hint,
Thanks for your attention

 best regards

 Marco Furlan
marco
Top achievements
Rank 1
 answered on 22 Oct 2013
1 answer
305 views
I am pulling data from SharePoint List Data service which has over 3000 records. Kendo Grid however is displaying only a 1000.
Atanas Korchev
Telerik team
 answered on 22 Oct 2013
3 answers
201 views
Hello,

When I tried to access the Kendo UI Dojo website (try.kendoui.com), I was not able to  see the navigation bar.

Afterwards, I checked the browser console and I saw the following errors.

[23:32:05.250] SyntaxError: unterminated string literal @ http://try.kendoui.com/javascripts/lib/kendo.all.min.js:2
[23:32:06.540] ReferenceError: kendo is not defined @ http://try.kendoui.com/javascripts/binders.js:1
[23:32:06.907] ReferenceError: kendo is not defined @ http://try.kendoui.com/javascripts/view_models/index_viewModel.js:2
[23:32:06.908] ReferenceError: kendo is not defined @ http://try.kendoui.com/javascripts/view_models/lesson_viewModel.js:3
[23:32:07.102] TypeError: this.set is not a function @ http://try.kendoui.com/javascripts/view_models/index_viewModel.js:1
[23:32:07.395] "Invalid App Id: Must be a number or numeric string representing the application id."
[23:32:07.399] "FB.getLoginStatus() called before calling FB.init()."

Is there a problem with the Dojo app, itself?
Atanas Korchev
Telerik team
 answered on 22 Oct 2013
2 answers
66 views
@(Html.Kendo().Scheduler<TaskViewModel>()
.Name("scheduler")
.Date(DateTime.Today)
.StartTime(new DateTime(2013, 1, 1, 7, 00, 00))
.EndTime(new DateTime(2013, 1, 1, 18, 00, 00))
.Height(500)
.MinorTickCount(1)
.MajorTick(15)
.Selectable(true)



.Editable(e => e.TemplateId("editor"))

.Views(views =>
{
views.DayView();
views.WeekView(weekView => weekView.Selected(true));
views.MonthView();
views.AgendaView();


})

.Messages(message =>
{
message.Today("Hoy Día");
message.AllDay("Todo el Día");
message.Save("Reservar");
message.Cancel("Cerrar");
message.Views(views =>
{
views.Day("Diario");
views.Month("Mensual");
views.Week("Semanal");


});

message.ShowWorkDay("Mostrar Todo el Día");
message.ShowFullDay("Mostrar Horario");


message.Editor(Editor =>
{
Editor.EditorTitle("Cita");

});


})

.Timezone("Etc/UTC")

.DataSource(d => d
.Model(m =>
{
m.Id(e => e.TaskID);
})
.Read("Read", "Action")
.Create("Create", "Action")
.Destroy("Destroy", "Action")
.Update("Update", "Action")
)

)

------------------------------------------------
TASK Class

public partial class Task : ISchedulerEvent2
{
public string Title { get; set; }
public DateTime Start { get; set; }
public DateTime End { get; set; }
public string Description { get; set; }
public bool IsAllDay { get; set; }
public string Recurrence { get; set; }
public string RecurrenceRule { get; set; }
public string RecurrenceException { get; set; }

public string Telefono { get; set; }
public string Ficha_Num { get; set; }
public string Medico { get; set; }
}

-------
And the template

<script id="editor" type="text/x-kendo-template">

<table border="0">
<tr style="border-style:hidden">
<td style="border-style:hidden"><label>Paciente</label></td>
<td style="border-style:hidden"><input style="width:300px;" field = "value: Title" data-bind="value: Title" /> <button class="k-button" data-bind="value: buscar_ficha">Buscar</button></td>
</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Teléfono</td>
<td style="border-style:hidden"><input data-bind="value: Telefono"/></td>
</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Comienza</td>
<td style="border-style:hidden"><input data-type = "date" data-role="datetimepicker" data-bind="value: Start" /></td>

</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Finaliza</td>
<td style="border-style:hidden"><input data-type = "date" data-role="datetimepicker" data-bind="value: End" /></td>
</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Médico</td>
<td style="border-style:hidden"><input data-bind="value: Medico"/></td>
</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Ficha</td>
<td style="border-style:hidden"><input data-bind="value: Ficha_Num"/></td>
</tr>
<tr style="border-style:hidden">
<td style="border-style:hidden">Memo</td>
<td style="border-style:hidden"><input style="width:300px;" data-bind="value: Description"/></td>
</tr>


</table>

</script>

The event appears on the scheduler, this means is reading from the controller, but when I click on the event to show the event window, the data is not reflected in the fields.

I will apreciate your help

Johnny
Johnny
Top achievements
Rank 1
 answered on 21 Oct 2013
1 answer
212 views
Using this example:
http://demos.kendoui.com/web/calendar/template.html

Is there any easy & quick way to make the calendar navigate on swipe event? It is easier for tablet users than having to click on the arrows (I think).

Thank you.
Ignacio
Top achievements
Rank 1
 answered on 21 Oct 2013
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
Application
Map
Drag and Drop
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
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?