Telerik Forums
Kendo UI for jQuery Forum
1 answer
66 views
Hi,
I'm wondering if there are any examples or documentation for the events for the range input control for mobile.  I want to be able to update a label that shows the current value of the range control as it is slid, but a lot of googling later I only seem to find articles about the desktop kendo controls.

What events are fired by the control?
What are are the properties of the event parameter they generate?

Thanks
Kiril Nikolov
Telerik team
 answered on 02 Jul 2013
4 answers
354 views
I have a need to allow the user to chose what action to take when a concurrency error occurs, I'm wondering how exactly I'd bind a RowVersion column to the Grid popup editor so it posts the timestamp back to my MVC action method? I was hoping I'd be able to simply designate it as a string in the data source model schema but I'm getting the error "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters."

Has anyone else run into this issue? How did you resolve it? I'm guessing that javascript appends a "\0" when it converts the byte array to a string, so I (think) the work-around is to strip off the terminator character and convert the string back to a byte array in the grids...Save event?
Daniel
Telerik team
 answered on 02 Jul 2013
1 answer
125 views
Hello, 

I'm new in KendoUI and I have one small question. 
Is there any way to get Url paramters from Grid paramters? What I need to do is to catch each user action on a KendoUI Grid (actions like sorting, grouping and filtering) and replace the current page Url without refreshing. In this case, users can then easily share their views.

Can you please let me know if you have any recommandation, or native feature to help me doing that. 

Thanks & regards. 


Daniel
Telerik team
 answered on 02 Jul 2013
3 answers
452 views
I have a HTML page that contains a kendo grid showing many pages.  I need remember the grid page number inside the kendo grid in code so that I can go back to the grid page from other HTML pages.  How can I access the grid page property when the grid page number is clicked?

Thanks in advance.
Alexander Valchev
Telerik team
 answered on 02 Jul 2013
2 answers
415 views
Hi,

I am looking for a way to assign color to a legend field. Please take a look at http://jsfiddle.net/ashriva/Cke4n/3/
In the above example I am trying to assign green color to the "Short" legend element to match its value field; similarly "Long" should be blue and "Flat" red. 

Any help is greatly appreciated. 

Thanks!
Iliana Dyankova
Telerik team
 answered on 02 Jul 2013
4 answers
516 views
I'm trying to do use the hierarchical aspect of the Kendo Grid. What I'm unable to find out is if when I make the Detail template do the children need to be already loaded from my repository? I thought since there was a Data-source it would make the call to the server get the children when it was loading. The Template grid has is null and there are no query strings (as followed by the example) Can I get some clarification on this please?
Alexander Valchev
Telerik team
 answered on 02 Jul 2013
2 answers
1.3K+ views
Is there a client-side method to force a tree node to clear and then re-load (or refresh) all child nodes?  I am dynamically loading a tree view and it's child nodes via AJAX.  When I add a node, I call another AJAX method to add the node to my database.  I would like the treeview/node to then refresh itself and automatically call the dataSource.read method for the node.

Thank you.

*** EDIT ***

I have found a solution that mostly works:

        var treeView = $('#catalogTreeView').data('kendoTreeView');
        var selectedNode = treeView.select();
        var selectedDataItem = treeView.dataItem(selectedNode);

                    treeView.collapse(selectedNode);
                    selectedDataItem.loaded(false);
                    treeView.expand(selectedNode);

However, the expand does not always work and the node stays collapsed.  Is this the correct way to do this, or is there a preferred method?
Steven
Top achievements
Rank 1
 answered on 01 Jul 2013
0 answers
64 views
EDIT: solved with 2013Q1 by adding grid.wrapper.empty()

Sorry, I cannot get this working on jsBin but it works locally on my PC.   It should be easy enough to assemble on your end.

In addition to grouping issue, the column-sort seems to have three modes: A-Z, Z-A, and random order.
Am I doing something wrong, or incompletely, when I destroy the grid in my SimulateSearchResults function?

NOTE: This problem is with 2012 version. When I use 2013 Q1, different issue -- a phantom column is created.

<body>
<div>
Wait until you see the both datasets created message before clicking these buttons.<br />
First click [First Dataset] button and try to group by City. Success. It works.<br />
Then click [Second Dataset] button and notice that grouping by City is disabled.<br />

<input type="button" onclick="javascript: SimulateSearchResults('one');" value="first dataset" />
<input type="button" onclick="javascript: SimulateSearchResults('two');" value="second dataset" />
<div id="grid">

</div>
</div>
</body>

file: ui.js


var datasets = {};
var points = [100, 120, 150, 220, 265, 340, 385, 388, 415, 426, 450, 471, 511, 522, 555, 616, 455, 483, 699, 700, 825, 850, 875, 900, 925, 935, 977, 1000];
var firstNames = ["Nancy", "Andrew", "Janet", "Margaret", "Steven", "Michael", "Robert", "Laura", "Anne", "Nigel", "Henry", "Harry", "Joe", "Tom", "Bill"];
var lastNames = ["Davolio", "Fuller", "Leverling", "Peacock", "Buchanan", "Suyama", "King", "Callahan", "Dodsworth", "White", "Green", "Black", "Jones", "Reed"];
var cities = ["Seattle", "Tacoma", "Kirkland", "Redmond", "London", "Philadelphia", "New York", "Seattle", "London", "Boston"];
var titles = ["Accountant", "Vice President, Sales", "Sales Representative", "Technical Support", "Sales Manager", "Web Designer",
    "Software Developer", "Inside Sales Coordinator", "Chief Techical Officer", "Chief Execute Officer"];

var birthDates = [new Date("1948/12/08"), new Date("1952/02/19"), new Date("1963/08/30"), new Date("1937/09/19"), new Date("1955/03/04"), new Date("1963/07/02"), new Date("1960/05/29"), new Date("1958/01/09"), new Date("1966/01/27"), new Date("1966/03/27")];


function generatePeople(itemCount, which) {
    var data = [],
        delay = 25,
        interval = 500,
        starttime;

    var now = new Date();
    //setTimeout(function () {
    starttime = +new Date();
    do {
        var firstName = firstNames[Math.floor(Math.random() * firstNames.length)],
                lastName = lastNames[Math.floor(Math.random() * lastNames.length)],
                city = cities[Math.floor(Math.random() * cities.length)],
                title = titles[Math.floor(Math.random() * titles.length)],
                birthDate = birthDates[Math.floor(Math.random() * birthDates.length)],
                age = now.getFullYear() - birthDate.getFullYear(),
                point = points[Math.floor(Math.random() * points.length)];

        data.push({
            Id: data.length + 1,
            FirstName: firstName,
            LastName: lastName,
            City: city,
            Title: title,
            BirthDate: birthDate,
            Age: age,
            Points: point
        });
    } while (data.length < itemCount && +new Date() - starttime < interval);

    if (data.length < itemCount) {
        setTimeout(arguments.callee, delay);
    } else {
        //callback(data);

        datasets[which] = data;
        alert('dataset ' + which + ' created');
    }
    //}, delay);
}

$(document).ready(function () {

    generatePeople(1000, 'one');
    generatePeople(1000, 'two');
 

});


function SimulateSearchResults(which) {
    var existingGrid = $('#grid').data('kendoGrid');
    if (existingGrid) {
        existingGrid.destroy();
        existingGrid.wrapper.html("");
    }

    setTimeout(function () {
        configureGrid(datasets[which]);
    }, 222);

}

function configureGrid(data) {
 
 
    $("#grid").kendoGrid({
        dataSource: {
            data: data,

            aggregate: [                   
                    { field: "Points", aggregate: "sum" }
                ]
        },

        groupable: true,
        sortable: true,
        height: 400,
        pageSize: 22,

        columns: [{
            field: "FirstName",
            groupable: false,
            width: "150px",
            title: "firstname"

        }, {
            field: "LastName",
            width: "200px",
            title: "lastname",
            groupable: false
        }, {
            width: "200px",
            field: "City",
            title: "city",
            groupable: true          
           
        },
         {
            width: "125px",
            field: "Points",
            title: "points",
            aggregates: ["sum"],
             footerTemplate: "Points for all Cities: #: data.Points.sum #",
            groupFooterTemplate: "Points: #: data.Points.sum #"
         }
          ]
    });

}





Tim R
Top achievements
Rank 1
 asked on 01 Jul 2013
1 answer
236 views
Hi

I'm trying to convert my site to utilise Kendo Grid, I'm trying to add a <div> that calls a javascript onClick using Column template but the javascript isn't being called. I suspect that it might have to do with how the data is loaded. Any idea on how I can add a clickable div through column template.

Also, how do i utilise Template instead of ClientTemplate ? what are the differences ?

<%: Html.Kendo().Grid<CIS.Models.Patients.PatientModel>()
      .Name("grid")
      .DataSource(dataSource => dataSource // Configure the grid data source
          .Ajax() // Specify that ajax binding is used
          .Read(read => read.Action("t1", "ttt")) // Set the action method which will return the data in JSON format
          .PageSize(25)
       )
      .Columns(columns =>
      {
          columns.Bound(p => p.ID).ClientTemplate(
              CIS.Models.Helpers.Controls.IconLink("Open", "ui-icon icon-folder-open", "ViewPatient", "Patients", new { patientID = "#= ID #" }) +
              "<div title=\"Edit\" class=\"ui-icon icon-pencil edit-patient-btn\" patientID=\"#= ID #\" style=\"display: inline-block\"> </div>"+
              "<div title=\"Remove\" class=\"ui-icon icon-trash remove-patient-btn\" patientID=\"#= ID #\" style=\"display: inline-block\"> </div>"
               
              ).Title("");
          columns.Bound(p => p.initials).Title("Initial");
          columns.Bound(p => p.dateOfBirth).Format("{0:dd/MM/yy}").Title("Date of Birth");
          columns.Bound(p => p.gender).Title("Gender");
 
      })
      .Pageable()
        .Sortable()
     
%>
Iliana Dyankova
Telerik team
 answered on 01 Jul 2013
1 answer
309 views
Hi,

I want to diable in-cell editing. I.E., I do not want user to double click on the cell and edit it.

However, if i disable editable, I am not able to perform row remove.

I have added remove functionality and edit functionality in a column like in this example.
http://demos.kendoui.com/web/grid/editing-inline.html

I am not using editable: "inline", in stead I am using editable: "true"

Because I want to prevent default
(e.preventDefault) and write my own functionality.

Can you help me with this
All I want is 
1. Non-Editable cells
2. Edit and Delete works as per above example
3. Edit default functionality to be overwritten with mine

Please help me with this
Thank you
Kiril Nikolov
Telerik team
 answered on 01 Jul 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)
SPA
Filter
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
OrgChart
TextBox
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
Popover
DockManager
FloatingActionButton
TaskBoard
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
TimePicker
DateTimePicker
RadialGauge
ArcGauge
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?