Telerik Forums
Kendo UI for jQuery Forum
4 answers
957 views
Hello,

Im using a beta version of kendoui.

Is there a way to limit the characters shown in a kendo grid cell?
I've tried using text-overflow but won't work.

thank you. :)
Masaab
Top achievements
Rank 1
 answered on 23 Apr 2014
2 answers
344 views
is there a way to get the list of uploaded files added to a datasource.
Here is my attempt, my alert box returns the appropriate data, but for some reason the grid is not displaying the returned data.
$("#files").kendoUpload({
                    async: {
                        saveUrl: "upload.aspx",
                        autoUpload: true,
                        batch: false
                    },
                    files: files,
                    upload: function (e) {
                        filecount = filecount + 1;
                        $.map(e.files, function (file) {
                            var info = file.name;
                            var filesize = file.size
                            var upGrid = $('#upfilelist').data("kendoGrid");
                            var dataSources = UFSource;
                            var newrecord = { ufid: compups, FileName: info, FileSize: filesize };
                            //alert(compups +'_'+ filename + '_' + filesize);
                            dataSources.insert(newrecord);
                            upGrid.dataSource = dataSources;
                        });
                    },
                    complete: function (e) {
                        //filecount = 0;
                        compups = compups + 1
                                                                        
                        document.getElementById("FileCount").innerText = 'Files Uploaded: ' + filecount;
                        $(".k-upload-files.k-reset").find("li").parent().remove();
                    },
                    showFileList: true
                     
                });









Troy Clemons
Top achievements
Rank 1
 answered on 22 Apr 2014
1 answer
194 views
I've been trying to solve this problem for a while with no luck. I'm trying to get some odata with the following code:

var dataSource = new kendo.data.DataSource({
    dataType: "odata",
    transport: {
        read: {
            url: "http://localhost:8080/odata/SDA/TEIID_TEST",
            beforeSend: function(req){
               req.setRequestHeader('Authorization','Basic dXNlcjp1c2Vy');
            }
        }
    }
 });
dataSource.read();  

Which seems like the right thing to do, given the other posts I've read on this subject. But when I actually look at what's going on using Tamper in Firefox, it sends an OPTIONS request. On the other hand, when I repeat the code used above WITHOUT the beforeSend part, it sends a GET request - but still no luck of course, because I can't authorize. 

How do I get around it? (Here's a StackOverflow post I made for reference, complete with screenshots.)


Kiril Nikolov
Telerik team
 answered on 22 Apr 2014
3 answers
688 views
Hi, I'm having a bit of trouble getting a multi select to pass the values back to the controller.
Here's what I have currently tried:

In my model:
[UIHint("abcEditor")] <- name of partial view containing the multiselect (used on grid popup window)
 public string[] abc { get; set; }

In my partial view:
@using Kendo.Mvc.UI
@(Html.Kendo().MultiSelect()
    .Name("abc") // Name of the widget matches in the model
    .DataValueField("ID")  <- PersonModel (Contains - ID, FullName, Email, etc..)
    .DataTextField("FullName")  
    .BindTo((System.Collections.IEnumerable)ViewData["def"]) // A list of PersonModels which is populated in the controller
    .Placeholder("Add")  
)

Controller: (Received Values)
- model.abc     {string[2]} string[]
    [0] null string
    [1] null string

ID is a Guid but if I try Guid[] I get the same result. 
I can select things fine, and it returns an array with the correct number selected, but the values in the array are null?
If anyone can point me in the right direction it would be a great help!
Thanks
Petur Subev
Telerik team
 answered on 22 Apr 2014
0 answers
147 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
336 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
97 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
107 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
270 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
139 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
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
Drag and Drop
Map
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?