Telerik Forums
Kendo UI for jQuery Forum
0 answers
113 views
I'm using a Kendo UI Bar chart and a json file with some dummy data (see attachment)
I needed to group this data, but I repeat this graph for each group, and I will show only the chart of that group.
a picture is added to make it more clear.
Is this possible to do this with Kendo UI or is there another way to do this?
Ibrahim
Top achievements
Rank 1
 asked on 22 Apr 2014
1 answer
307 views
(Crosspost from https://stackoverflow.com/questions/23188715/getting-list-of-dates-in-view-for-kendo-ui-calendar)

How can I get a list of the dates currently visible in Kendo UI Calendar? For example, the view for April 2014 includes dates from 30th March to 10th May, and I need a reliable way to get a list of those dates, even when changing month to June, for example.
Georgi Krustev
Telerik team
 answered on 22 Apr 2014
1 answer
84 views
Is it possible using the multi select dropdown list to select multiple items at once by pressing and holding the "ctrl" key on the keyboard and selecting items from the drop down at once?

If yes, can you please share a small code snippet?

Thanks in adv.
Kiril Nikolov
Telerik team
 answered on 22 Apr 2014
1 answer
76 views
Hi,

Kendo Menu stop working after upgrading Kendo from 2013.3.1119 to 2013.3.1324.
Please go through plunkers and try out. Some times you'll observe that sub menu not displayed on hovering when we clicked on parent menu.
1. http://plnkr.co/edit/JW0rn48s6AAJPgUPlAmr?p=preview - Not working on version 2013.3.1324
2. http://plnkr.co/edit/uhdwCUbIjONQcOKNq56A?p=preview - Working on version 2013.3.1119


Please let me know if we have any workaround to fix this issue on 2013.3.1324?


Regards,
Vinay
Kamen Bundev
Telerik team
 answered on 22 Apr 2014
2 answers
250 views
Hi,

I am trying to work on the grid like below,

 basically i give a checkbox to user, when it is not checked, the grid only display data from URL1,
but if the checkbox is checked, it merge 2 json data and display the comparison of URL1 and URL 2

<label><input type="checkbox" name="compCB" id="compCB">Enable Compare</label>
<div id="grid" style="height: 365px"></div>
<script>
$(document).ready(function () {
  var url1="http://XXXXXXXXX/clients/1";
  var url2="http://XXXXXXXXX/clients/2";
  var J1=null;
  var J2=null;
  var Jdata;
  var toCompare;
  loadData('init');

  function loadData(act){
    toCompare =$('#compCB').is(':checked');
      if(act=='init'||act=='reload'){
        $.getJSON(url1, function(jd) {
          J1=jd;
          meargeData();
        });
      };
      if(toCompare){
        $.getJSON(url2, function(jd) {
          J2=jd;
          mergeData();
        });
      }else if(act='toggle'){
        J2=null;
        mergeData();
      };
    };
    function mergeData(){
      if(J1!=null&&(J2!=null||!toCompare)){
        if(!toCompare){
          Jdata=[{
            clientId: J1.clients[0].clientId,
            name: J1.clients[0].name,
            status: J1.clients[0].status
          }];
        }else{
          Jdata=[{
            clientId: {
              C1: J1.clients[0].clientId,
              C2: J2.clients[0].clientId
            },
            name: {
              N1: J1.clients[0].name,
              N2: J2.clients[0].name
            }, 
            status: {
              S1: J1.clients[0].status,
              S2: J2.clients[0].status
            }
          }];
        };
        genGrid();
      };
    };
    function genGrid(){
      if(!toCompare){
        RT='<tr data-uid="#= uid #"><td>#: clientId #</td><td><strong>#: name #</strong></td><td style="text-transform:lowercase;">#: status #</td></tr>';
        ART='<tr data-uid="#= uid #" style="background-color:rgb(255,200,255)"><td>#: clientId #</td><td><strong>#: name #</strong></td><td style="text-transform:lowercase;">#: status #</td></tr>';
      }else{
        RT='<tr data-uid="#= uid #"><td>#: clientId.C1 #<br/>#: clientId.C2 #</td><td><strong>#: name.N1 #<br/>#: name.N2 #</strong></td><td style="text-transform:lowercase;">#: status.S1 #<br/>#: status.S2 #</td></tr>';
        ART='<tr data-uid="#= uid #" style="background-color:rgb(255,200,255)"><td>#: clientId.C1 #<br/>#: clientId.C2 #<br/></td><td><strong>#: name.N1 #<br/>#: name.N2 #</strong></td><td style="text-transform:lowercase;">#: status.S1 #<br/>#: status.S2 #</td></tr>';
      };
      $("#grid").kendoGrid({
        dataSource: {
          type: "json",
          data: Jdata,
          pageSize: 3,
        },
        groupable: true,
        sortable: true,
        resizable: true,
        columnResizeHandleWidth: 6,
        pageable: {
          refresh: true,
          pageSizes: true,
          buttonCount: 5
        },
        columns: [{
          title: "ID",
          width: 200
        }, {
          title: "Client Name",
          width: 250
        }, {
          title: "Status"
        }],
        rowTemplate: RT,
        altRowTemplate: ART
      });
    };
    $('#compCB').change(function(){
      loadData('toggle');
    });
  });
</script>

Now, I am trying to do it in the MVVM structure, the first problem I face is how do I change the  rowTemplate and altRowTemplate dynamicly?


 





Wesley
Top achievements
Rank 1
 answered on 22 Apr 2014
2 answers
98 views
Hi!
I have a listview containing a template with a sparkline in.
I have around 15 items in the listview and it takes about 8 seconds to load the page and create all the sparklines.
Today, nothing is shown before all sparklines are created (i'm using the data-init event).
It feels like the application has stoped responding so I want to change this behaviour.

I want the page to load faster and after it has finished loading, it start to create the sparkline asynchronisly (like ajax updates)
Is this possible?

Regards,
Per
Per
Top achievements
Rank 1
 answered on 21 Apr 2014
2 answers
87 views
I have a view which has a listview inside. When I click on an item a ModalView which shows the detail is opening. When I click remove, the item is being removed. 

My problem is, when I click on an item inside the listview, the dialog is openning again with the related data but the button is not enabled.

What am I doing wrong?

function closeModalViewRemove() {
   
  $("#modalview-app-remove").kendoMobileModalView("close");

};


function deleteFromJson() {
 
  var $app_list = localStorage.getItem('LsAppList');
  var AppListJson = JSON.parse($app_list);

    jQuery.each(AppListJson, function(i, val) {
                                         if (AppListJson[i].extapp_id == appdetail.get("addAppId"))
{    
    AppListJson.splice([i], 1);
$app_list = JSON.stringify(AppListJson);
localStorage.setItem('LsAppList',$app_list);
closeModalViewRemove();
 
}
}); 


}
goex
Top achievements
Rank 1
 answered on 21 Apr 2014
1 answer
121 views
Hi,

I am trying ‘Save all changes with one request’ (http://www.telerik.com/support/code-library/save-all-changes-with-one-request) solution. I modified UpdateCreateDelete() method to return  modified data as response to the request. Now I want to make datasource and grid update
themselves smoothly without the additional roundtrip caused by calling read().

Please suggest how I may do this.

public ActionResult UpdateCreateDelete([DataSourceRequest] DataSourceRequest request,
            [Bind(Prefix = "updated")]List<Order> updatedOrders,
            [Bind(Prefix = "added")]List<Order> newOrders,
            [Bind(Prefix = "deleted")]List<Order> deletedOrders)
        {
            if (updatedOrders != null && updatedOrders.Count > 0)
            {
                for (int i = 0; i < updatedOrders.Count; i++)
                {
                    var target = orderList.Where(o => o.OrderID == updatedOrders[i].OrderID).FirstOrDefault();
  
                    if (target != null)
                    {
                        int targetIndex = orderList.IndexOf(target);
                        orderList[targetIndex].OrderDate = updatedOrders[i].OrderDate;
                        orderList[targetIndex].EmployeeID = updatedOrders[i].EmployeeID;
                        orderList[targetIndex].OrderDescription = updatedOrders[i].OrderDescription;
                    }
                }
            }
  
            if (newOrders != null && newOrders.Count > 0)
            {
                for (int i = 0; i < newOrders.Count; i++)
                {
                    newOrders[i].OrderID = orderList[orderList.Count - 1].OrderID + 1;
                    orderList.Add(newOrders[i]);
                }
                
            }
  
            if (deletedOrders != null && deletedOrders.Count > 0)
            {
                for (int i = 0; i < deletedOrders.Count; i++)
                {
                    var target = orderList.Where(o => o.OrderID == deletedOrders[i].OrderID).FirstOrDefault();
  
                    if (target != null)
                    {
                        orderList.Remove(target);
                    }
                }
            }
  
            List<Order> responseOrders = new List<Order>();
            responseOrders.AddRange(updatedOrders);
            responseOrders.AddRange(newOrders);
            responseOrders.AddRange(deletedOrders);
  
            return Json(responseOrders.ToDataSourceResult(request, ModelState));
  
            //return Json("Success!");
        }
  
<script>  
    function sendData() {
        var grid = $("#Grid").data("kendoGrid"),
            parameterMap = grid.dataSource.transport.parameterMap;
        
        //get the new and the updated records
        var currentData = grid.dataSource.data();
        var updatedRecords = [];
        var newRecords = [];
  
        for (var i = 0; i < currentData.length; i++) {
            if (currentData[i].isNew()) {
                //this record is new
                newRecords.push(currentData[i].toJSON());
            } else if(currentData[i].dirty) {       
                updatedRecords.push(currentData[i].toJSON());
            }
        }
  
        //this records are deleted
        var deletedRecords = [];
        for (var i = 0; i < grid.dataSource._destroyed.length; i++) {
            deletedRecords.push(grid.dataSource._destroyed[i].toJSON());
        }
        
        var data = {};
        $.extend(data, parameterMap({ updated: updatedRecords }), parameterMap({ deleted: deletedRecords }), parameterMap({ added: newRecords }));
  
        $.ajax({
            url: "/Home/UpdateCreateDelete",
            data: data,
            type: "POST",
            error: function() {
                //Handle the server errors using the approach from the previous example
            },
            success: function (result) {
  
                // How to make datasource and grid update themselves smoothly without the additional roundtrip caused by calling read()              
                 
            }
        });
    }
</script>

 
Alexander Popov
Telerik team
 answered on 21 Apr 2014
1 answer
159 views
Hello
I know there is currently no clustering support for DataViz Map.

I would like to ask about possible solution to use 3rd party library like Leaflet or OpenLayers. I've tried to find in documentation place where I can put my code to display cluster. I cannot find dataBound event like in other controls to make operations on data source.

To clarify. I want to use DataSource to download remote data necessary to display complex tooltip and cluster. So I need the place on map widget where I can start rendering such data using 3rd party library.

Kind Regards
Marcin
Alexander Popov
Telerik team
 answered on 21 Apr 2014
1 answer
158 views
Hi all,

I am using the Kendo controls in a MVC4 project. In one of the pages I'd like to get drag and drop functionality just exactly like in this Kendo ASP.NET Control:
https://demos.telerik.com/aspnet-ajax/listview/examples/itemdragdrop/defaultcs.aspx


Have anyone implemented something similar??

Cheers
Alexander Valchev
Telerik team
 answered on 21 Apr 2014
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?