Telerik Forums
Kendo UI for jQuery Forum
1 answer
200 views
I use VS extension for AppBuilder and try to do following:

My View (report.html file) here:

<div data-role="view" id="view-all-tasks" data-layout="default" class="activities-view" data-model="app.pointTasksService.viewModel">
    <ul id="point-tasks-listview" data-type="group" data-style="inset" data-role="listview"
   data-template="pointTaskTemplate" data-header-template="pointTaskHeaderTemplate"
   data-bind="source: pointTasksDataSource" data-fixed-headers="true"></ul>

</div>

<!-- Task group template -->
<script type="text/x-kendo-template" id="pointTaskHeaderTemplate">
   <span style="color:blue">${value}</span>
</script>

<!-- Tasks ListView Template -->
<script type="text/x-kendo-template" id="pointTaskTemplate">
   <button id="show-dls-btn" data-bind="events: { click: reportSelect }"> Тест </button>
   //here are items from DataSource (display correctly)
</script>

My ViewModel here:
var app = app || {};

app.PointTasks = (function () {
'use strict'

// pointTasks model
var pointTasksViewModel = kendo.data.ObservableObject.extend({
   pointTasksDataSource: null,

init: function () {
var that = this,
dataSource;

kendo.data.ObservableObject.fn.init.apply(that, []);

dataSource = new kendo.data.DataSource({
schema: {
model: {
Id: 'Id',
fields: {
   ///here contains fields
}
},
transport: {
read: function (options) {
$.ajax({
type: "GET",
url: myServiceURI,
dataType: "json",
});
}
},

group: "FormattedDate()",
sort: { field: 'FormattedDate()', dir: 'desc' }
});

that.pointTasksDataSource = dataSource;

},

reportSelect: function () {
   alert('Thats work fine!'); 
}

});

app.pointTasksService = {
viewModel: new pointTasksViewModel(),
logout: function () {
app.helper.logout();
}

};

}());

When I click on button (id="show-dls-btn") in ListView the error appears:
"Uncaught TypeError: undefined is not a function from 'http://local/simulator/kendo/js/kendo.mobile.min.js:12"

P.S.: If I move button out of template, event fires and all works fine.
Petyo
Telerik team
 answered on 20 Jan 2015
6 answers
265 views
Hello,
The performances of the treelist component are very bad if this component contains more than 1000 rows.
To illustrate this problem, I created a small script: http://dojo.telerik.com/UGUXi

This script loads a treelist with 2 columns and 8000 rows.
var data = [{ name: "Jane Doe", age: 30 }, { name: "John Doe", age: 33 }...];
var treeList = $("#treeList").data("kendoTreeList");
treeList.dataSource.success(data);

With Chrome, the rendering takes 1903 ms.
But with Internet Explore 11, the same tree rendering takes 24160 ms.
Why the treelist rendering is so slow with IE? 

For information, I tested the same script with the very last version of Kendoui (2014.3.1125) but unsuccessfully.

Any tips are welcome because this problem is quite critical for me.

Thanks,
Luc
Kiril Nikolov
Telerik team
 answered on 20 Jan 2015
3 answers
181 views
I have converted HTML table in MVC app to use Kendo Grid UI.  Kendo Grid is showing correctly, but filter and paging in Grid does not work. Below is sample code, what is wrong.


@model IEnumerable<YochApp.Models.Document.APP_DATA_DOCUMENT>
@{
    ViewBag.Title = "Index";
}

<h5 class="title">Document List</h5>
<div id="clientGrid">
    <table class="table" id="appDocuments">
        <colgroup>
            <col style="width:130px" />
            <col style="width:130px" />
            <col style="width:130px" />
            <col style="width:120px" />         
        </colgroup>
        <thead>
            <tr>
                <th>Actions</th>
                <th>
                    @Html.DisplayNameFor(model => model.DOC_TITLE)
                </th>
                <th>
                    @Html.DisplayNameFor(model => model.DOC_FILENAME)
                </th>

                <th>
                    @Html.DisplayNameFor(model => model.DOC_SIZE)
                </th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td>

                        @Html.ActionLink(".", "Details", "Document", new { id = item.DOC_ID }, new { style = "display:inline", @class = "ui-icon ui-icon-zoomin", title = "Details" })                    
                        @Html.ActionLink(".", "Delete", "Document", new { id = item.DOC_ID }, new { style = "display:inline", @class = "ui-icon ui-icon-close", title = "Delete" })
                    </td>

                    <td>
                        @Html.DisplayFor(modelItem => item.DOC_TITLE)
                    </td>
                    <td>
                        @Html.DisplayFor(modelItem => item.DOC_FILENAME)
                    </td>

                    <td>
                        @Html.DisplayFor(modelItem => item.DOC_SIZE)
                    </td>
                </tr>
            }
        </tbody>
    </table>
</div>

@section FooterScripts {

    <script>
    $(document).ready(function () {
        $("#appDocuments").kendoGrid({
            height: 500,
            width: 600,
            sortable: true,
            reorderable: true,
            resizable: true,
            pageable: true,
            filterable: true,
            scrollable: true,
            columnMenu: true
        });
    });
    </script>
}


In my layout page I have included all script kendo javascript (   @Scripts.Render("~/bundles/kendo")) ....which refer to info below in BundleConfig

  bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
                        "~/Scripts/Kendo/kendo.all.min.js",
                        "~/Scripts/Kendo/kendo.aspnetmvc.min.js"
                       ));
Kiril Nikolov
Telerik team
 answered on 20 Jan 2015
7 answers
304 views
I am wanting to create a AutoComplete field that displays results of multiple types. For example, an AutoComplete search field that returns suggestions for both Users and Posts. The results come from a remote server which does the filtering.

Each of the types returned by the remote server have a unique way they should appear in the list. I would also like to group them, so the dropdown list might look like this:
--------------------------
Users
--------------------------
Jeff
John
Jacob
Jeremy
--------------------------
Posts
--------------------------
About Jeff
Dinner with Jacob

I have had no problems getting the results from the server and getting them bound to the dataSource, but what I would like is to be able to intercept the creation of the dropdown list so I can apply specific templates to the items depending on the data type. I would also need to know the best way to insert the group header and disabling it so it can't be selected.

And suggestions on how to do this? Perhaps I am trying to do something with this control that would be better done in another control?
Dimiter Madjarov
Telerik team
 answered on 20 Jan 2015
8 answers
1.2K+ views
If I have a column with values like this

a
e
null
null
b
f

And toggle sort on that column, only the values above null are affected

e
a
null
null
b
f

Can null values be read as empty strings/ or some value that places them on the bottom when sorting
Can the sort function be replaced with a custom sort function?
Kiril Nikolov
Telerik team
 answered on 20 Jan 2015
1 answer
254 views
I enabled server filtering and sorting. How can I filter and sort with one method. I don't want two request to the server.
Is it save to use filter and sort method one after another or there will be multiple request send to server?
Rosen
Telerik team
 answered on 20 Jan 2015
2 answers
237 views
When I use SaveAsPdf I first get a notification to save to pdf, then it opens i Acrobat Reader.

When I try to save the pdf using SaveAs funtion in Acrobat Reader I get the following error message,

The document could not be saved. There was a problem reading(23)

I have

* Windows 7, 64-bit
* Acrobat Reader 11.0.0


Kiril Nikolov
Telerik team
 answered on 20 Jan 2015
3 answers
178 views
Version: 2014.3.1314

The kendo.data.DataSource typescript definition seems to be missing:

-"transport" object - I have to cast it to "any", then use ".transport" on it.
-A way to configure SignalR - unless I'm just missing something here...

On a similar note, the kendo SchedulerView definition seems to be missing "start" and "end" as well.

Thanks!
T. Tsonev
Telerik team
 answered on 20 Jan 2015
1 answer
190 views
Hi, 

I have a grid server side paging and filtering and need to implement select all results. 
is there any way to get all results ignoring page size ? 
Nikolay Rusev
Telerik team
 answered on 20 Jan 2015
1 answer
243 views
Hi,
I'm building a grid using the ASP.NET helpers, but that's unrelevant.

I'm performing CRUD operation over a DB where some tables starts with ID 0. As a result, I'm forced to set the DefaultValue for that column to -1, because the other numbers may be used for the table rows.
But actually for everytime the user wants to perform an insertion, i don't want to show the ugly "-1" as ID default value, but i would like to set the first available number or otherwise zero.

Is there a way to associate a function to return the defaultValue or to anyway change the default value in an elegant way?

Thanks
Alexander Popov
Telerik team
 answered on 20 Jan 2015
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
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
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?