Telerik Forums
Kendo UI for jQuery Forum
1 answer
81 views
I have a custom bound ajax grid with server operation (for paging, sorting, filtering etc). On the server side it would sometimes be more efficient to fetch all the data rather than just one page. If I return more than a page worth of data the grid just shows it all (as you would expect!), so what I want to do is switch to client side paging if more than a page worth of data is returned... is this possible?

I've tried setting the option on the grid during the DataSource.RequestEnd event, but this doesn't seem to have any real effect (I've tried also calling grid.Refresh, grid.SetDataSource).
Nikolay Rusev
Telerik team
 answered on 16 Sep 2013
4 answers
137 views
Dear Telerik,

I use grid in my project and would like to provide multi-select options in user-editing. But I got some strange issue using multi-select.
In my project I use multi-select like this. 
$("#grid").kendoGrid({
                    dataSource: dataSource,
                    pageable: true,
                    resizable: true,
                    sortable: true,
                    filterable: true,
                    toolbar: ["create"],
                    save: function (e) {
                        e.model.dirty = true;
                    },
                    detailTemplate: kendo.template($("#template").html()),
                    detailInit: detailInit,
                    columns: [
                        //{ field: "id", title: "id Name" },
                        { field: "Server_Name", title: "Server Name", width: "150px" },
                        { field: "Server_IP_Address", title: "Server IP Address", width: "120px" },
                        { field: "Data_Center_City", title: "City", width: "56px" },
                        { field: "Data_Center_Location", title: "Data Center Location", width: "156px" },
                        { field: "Server_Type", title: "Server Type", width: "100px" },
                        { field: "Server_Instance", title: "Server Instance", width: "120px" },
                        { field: "Environment", title: "Environment", width: "100px", editor: appDropDownEditor },
                        { command: ["edit", "destroy"], title: " ", width: "170px" }],
                    editable: "inline"
                });
            }
 
function appDropDownEditor(container, options) {
            $('<input required data-bind="value:' + options.field + '"/>')
                .appendTo(container)
                .kendoMultiSelect({
                    dataTextField: "text",
                    dataValueField: "text",
                    dataSource: [ { text: "PRD" }, { text: "QA" }, { text: "DEV" } ]
                });
        }
I wonder where I got wrong and it appeared with a strange <input> and a <span> unexpected. Just like the image.

I'd like to ask you that how can I use multi-select to get user input in dropdown list? I checked the demos but only found demo for <select> tag or for MVC usage.
I'm looking forward for your reply.
hongbo
Top achievements
Rank 1
 answered on 16 Sep 2013
4 answers
308 views
Hello,

I'm trying to integrate Bootstrap menu through Kendo UI template.

I'm getting JSON values from MVC controller and rendering it's values to the template but I'm getting ReferenceError:  MenuText is not defined.

I tried using #: data.MenuText # / #: MenuText # but I still get same result, when I dot this #: data # it returns [object, Object]


Please advise
D

MVC controller
public ActionResult GetMenu()
     {
         _menu = GenerateMenuValues();
 
         return Json(_menu, JsonRequestBehavior.AllowGet);
 
     }
 
     private List<MenuValues> GenerateMenuValues()
     {
         return new List<MenuValues>()
         {
             new MenuValues(){Active = "active", MenuText = "Home", Url = "\\#"},
             new MenuValues(){MenuText = "Web widget", Url="\\#", SubMenu = new List<MenuValues>()
             {
                 new MenuValues(){MenuText = "Grid widget", Url = Url.Action("GridWidget","Home")},
                 new MenuValues(){MenuText = "Auto complete", Url = Url.Action("AutoCompleteWidget","Home")},
                 new MenuValues(){MenuText = "Combo box", Url = Url.Action("ComboBoxWidget","Home")},
                 new MenuValues(){MenuText = "Dropdown List", Url = Url.Action("DropdownListWidget","Home")},
                 new MenuValues(){MenuText = "Numeric text", Url = Url.Action("NumericTextbox","Home")},
                 new MenuValues(){MenuText = "Window", Url = Url.Action("WindowWidget","Home")},
                 new MenuValues(){MenuText = "Tree view", Url = Url.Action("TreeViewWidget","Home")},
                 new MenuValues(){MenuText = "Tab strip", Url = Url.Action("TabStrip","Home")}
             }},
             new MenuValues(){MenuText = "Data Source", Url = Url.Action("DataSource","Home")},
             new MenuValues(){MenuText = "MVVM", Url = Url.Action("Mvvm","Home")}
 
 
         };
     }
HTML markup / template
<script type="text/x-kendo-template" id="menuTemplate">
        <div class="col-md-12">
            <nav class="navbar navbar-static-top" role="navigation">
                 
            <div class="navbar-header">
                <a class="navbar-brand" href="\#">Learning Kendo</a>
            </div>
                     
                <ul class="nav navbar-nav">
                 
              <li> #= MenuText # </li> // just to test that values are rendering
      
    </ul>
        </nav>
        </div>
</script>
<script type="text/javascript">
 
    $(document).ready(function () {
        var dataService = '/DataServices/';
        var menuData = $.getJSON(dataService + 'GetMenu');
        var menuTemplate = kendo.template($('#menuTemplate').html())(menuData);
        $('#templateMenu').html(menuTemplate);
 
    });
 
 
</script>

Mark
Top achievements
Rank 1
 answered on 14 Sep 2013
1 answer
104 views
I have some concerns on the viability of migrating from ASP.NET Scheduler to Kendo UI scheduler. Particularly, the manner in which recurrence is handled in the two products is handled. It would be VERY GOOD if both systems store data in the same way. At the very least, have a way to convert data over from one system to the other.

Otherwise, migration would be very hard to do.

Thanks,

Brian
Georgi Krustev
Telerik team
 answered on 13 Sep 2013
1 answer
95 views
It doesn't seem to work for me
It is supposed to but I haven't found complete documentation on how to do this. For example I was able to set Virtual to true with the following code(note I am using MVC extensions).
.Scrollable(s => s.Virtual(true).Height(532))
The server code
public ActionResult IndexEmployeesGridData([DataSourceRequest] DataSourceRequest request)
{  
    var model = _employeeService.GetEmployeesDataViewModel(request.Page, request.PageSize).Where(e => e.IsActive);
    return Json(model.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
}


Code works for the first page only.

The grid fills up with the first page of data but nothing else. Since the grid has no idea how many rows are in the database it just forgets about any more records. I don't know how to complete the last part to get the dynamic virtual paging  to work properly. Any help would be greatly appreciated. 

Thanks

1 hour ago (Link to this post)

It doesn't seem to work for me
It is supposed to but I haven't found complete documentation on how to do this. For example I was able to set virtualization to true with the following code(note I am using MVC extensions).
.Scrollable(s => s.Virtual(true).Height(532))
This of course doesn't work well for large datasets because you have to have some sort of paging set up on the server. There is documentation saying that you should add the parameters page, pageSize, take, and skip etc.. in order for this to work. I did this but then I get an error. 

The server code
public ActionResult IndexEmployeesGridData([DataSourceRequest] DataSourceRequest request, Int32 page, Int32 pageSize)
{  
    var model = _employeeService.GetEmployeesDataViewModel(page, pageSize).Where(e => e.IsActive);
    return Json(model.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
}
The erorr message
Server Error in '/' Application.The parameters dictionary contains a null entry for parameter 'page' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult IndexEmployeesGridData(Kendo.Mvc.UI.DataSourceRequest, Int32, Int32)' in 'SafetyPlus.Controllers.EmployeeController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Parameter name: parameters

Using the Data property I was able to get data to the server. 
.DataSource(datasource => datasource
    .Ajax()
    .PageSize(20)
    .Read(read => read.Action("IndexEmployeesGridData", "Employee").Data("sendStatus"))))
And the script that gets the parameters to take. 
<script type="text/javascript">
 
    function sendStatus(options)
        return {
            page: options.page,
            pageSize: options.pageSize
        };
    }
</script>
Help needed.
The grid fills up with the first page of data but nothing else. Since the grid has no idea how many rows are in the database it just forgets about any more records. I don't know how to complete the last part to get the paging to work properly. Any help would be greatly appreciated. 

Thanks
Daniel
Telerik team
 answered on 13 Sep 2013
4 answers
200 views
Hi,

I was trying to create a quick KendoUI demo with a small table.

The table is about 14 columns with 139 row.

The demo consists of a chart to display the first row of the grid and 2 grids just to test that it is possible to show 2 grids...

I used firebug to test the load time... it takes 1.39 secs on average... would like it to be fast if possible...

But what is annoying is that when I click to another page on the grid, each page showing only 10 records, it takes over 2 seconds?!?

I don't understand why it takes longer to page across pages than to load the entire page...

I also tried this via AJAX using MVC but the same page takes 6 seconds to load and paging there takes 6 seconds too...

Can anyone tell me why the demo I am using with BindTo is taking so long to page between pages?

I've been looking at JQgrid and its instantaneous there.... I can't see why it is so slow in KendoUI....


Regards,

William
Petur Subev
Telerik team
 answered on 13 Sep 2013
1 answer
259 views
hi guys
i try to use the time picker and date picker  (after following the mvvm demo on demo section) in my mobile app with no success.
other widgets such dropdownlist and combobox are work.
also i googled it and did not found any note that say its not applicable.
i use icenium and kendo mobile&web for the development.
hope you will help me or can provide me a link to date picker for mobile.
best regards 
maor
Kiril Nikolov
Telerik team
 answered on 13 Sep 2013
5 answers
610 views
Hi,

I just want to know how to post data using the parameterMap function in kendo scheduler, as what I understand the default type is "Get", for some reason I need to do a "Post" type, It seems that my code (see sample code below) does not work, and when I look into the posted data the result is always something like this ( f=%22somedata%22 ) Is there something  wrong in my code? 

dataSource: {
  transport: {
       read: {
      type: "POST",
      url: "myurl",
      dataType: "json",
      contentType: "application/json; charset=utf-8"
 
       },
       parameterMap: function (options, operation) {
                                           
         return { f: JSON.stringify("somedata") };
         }
       },
        schema:
               {
                   //some code here....
               }
 }
I also try the code below as what I see in this link http://jsfiddle.net/Xhrrj/4/.. but it seems not working to me.. the result of the posted data is something like this ( f= somedata )...
parameterMap: function (options, operation) {
                                                                                    $.extend({}, options, { f: "somedata" })
                                        }

 
Thanks,

Regards, 
Jesson
Jsn
Top achievements
Rank 1
 answered on 13 Sep 2013
1 answer
41 views
Hi All,

I am trying to prevent the user from entering values again and again when the application starts. I want the user to store the values only once.   Let me know if there is any method in Icenium that can store the values like how there is plist in IOS. 

Thanks

Gaja Naik
Filip
Top achievements
Rank 1
 answered on 13 Sep 2013
7 answers
746 views
Just when I think I have it beat another problem comes up with Listview Endless Scrolling.

Attached are a couple screenshots from my app on an iPad mini. Quick background on the app:
This view of the app - General Log - should display a list of all log entries entered into the system from the beginning of time (app time that is).  This particular log contains 4252 entries as stored in the "total" field of the datasource.  pageSize = 100 and I have verified that with each pull there are exactly 100 records returned from the server. Everything works flawlessly in the Icenium emulator and about 90% of the time when executed as a Cordova app on an iPhone4s and iPhone5.  On larger tablet devices the listview breaks 100% of the time when the endless scroll mechanism tries to fetch a new batch of records AND the user is scrolling quickly.  If you scroll very slowly through all records the endless scroll does its job and all is well - but, try scrolling fast - like all users do - and it breaks.

I know that per the documentation notes you need a minimum number of records in the pageSize so that the virtual listview can regenerate as required.  I have tried a range of pageSizes and for the phone devices 100 works well.  On the tablets it doesn't matter what the pageSize is - same results.

Overall scrolling performance with Endless scrolling enabled is also very poor.  With 100 records loaded the scrolling is choppy at best. Disabling endless scrolling and those same 100 records scroll like butter.

Screenshots:
1) Blank area at top of listview.  This seems to happen when the virtual listview can't keep up with the scrolling and once this happens the only way to recover is to close the view and reopen it.  No new pages will be pulled from the server and scrolling breaks almost completely.  My assumption is that the threshold/trigger that causes the datasource to update is too high and by the time the data is pulled from the server the scrolling has already passed the virtual limit and it can't recover.  Can the threshold be modified to update the datasource when the scroller hits 50% of the data instead of the default 66% or whatever it is?

2) Continuing to scroll down from the "blank" top of #1 you reach the bottom of the active scroller and it will not continue fetching pages and you can see the rendering of list items becomes unstable - note the overlapping list items.

Here is my code - there may be a glaring error but I can't see it.  Again, everything works like expected in the emulator and almost always on smaller devices - problem is severe on tablets - both iOS and Android.  I'll try any suggestions and report back - I find it hard to believe I'm the only one experiencing this type of problem.

// GENERAL LOG
var genLogDataSource = new kendo.data.DataSource({
    pageSize: 100,
    serverPaging: true,
    transport: {
        read: {
            url: "https://xxxxxxxx.xxx/xx/xxx/generalLog.php",
            type: "GET",
            dataType: "json"
        },
        parameterMap: function(options) {
            return {
                take: options.take,
                skip: options.skip
            };
        }
    },
    schema: {
        data: "ds",
        total: "total"
    }
    });

function initGenLog(){
    $("#listview-genlog").kendoMobileListView({ 
        dataSource: genLogDataSource, 
        template: $("#listview-genlog-template").html(),
        endlessScroll : true, 
        click: function(e){
            var fileId = e.target.attr('fileId');
            if(fileId) openFile(fileId);
            else return false;
        }
    });
}
Petyo
Telerik team
 answered on 13 Sep 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?