Telerik Forums
Kendo UI for jQuery Forum
1 answer
146 views
.cshtml

<script type="text/x-kendo-tmpl" id="flashetTemplate">
        <div class="flashetItem" id="flashetContainer">
        <h5>${Name.substring(0,10)}</h5>
            <span class="flashetDesc">${Description.substring(0,150)}</span>
            <table class="flashetsTable">
                <tr>
                    <td class="flashetStats"><img src="/Content/Images/ThumbsUp.png" title="Likes" /></td>
                    <td class="flashetStats"><img src="/Content/Images/Comments.png" title="Comments" /></td>
                    <td class="flashetStats"><img src="/Content/Images/Shared.png" title="Shared" /></td>
                    <td class="flashetStats"><img src="/Content/Images/relevance.ico" title="Relevance" /></td>
                    <td class="flashetStats"><img src="/Content/images/folder.png" title="Resources" /></td>
                </tr>
             
            </table>
    </div>

@(Html.Kendo().ListView<Flashet>() //The listview will be initially bound to the Model which is the Products table
          .Name("flashetView") //The name of the listview is mandatory. It specifies the "id" attribute of the widget.
          .TagName("div") //The tag name of the listview is mandatory. It specifies the element which wraps all listview items.
          .ClientTemplateId("flashetTemplate") // This template will be used for rendering the listview items.
          .DataSource(dataSource => {
                                        dataSource.Read(read => read.Action("GetFlashetsData", "Home"));
                                        dataSource.PageSize(5);
          })
          .Pageable())

Jquery
$(document).ready(function () {
    //alert("document loaded...");
    $("#flashetContainer").click(function (event) {
        alert('div clicked....');
    });
});

Why does the click event not work when we click on the div. What would the dynamic id be <div class="flashetItem" id="flashetContainer"> , since based on the GetFlashetsData resultset there would be multiple div blocks generated
Dimiter Madjarov
Telerik team
 answered on 23 Apr 2014
5 answers
201 views
Currently my web application is in flex ui , We are trying to migrate to kendo ui. But im facing problem in binding the grid with restful services . 
I used ajax call and was able to bind it to IE of a lower version. But the code still doesnt work with other browsers and also IE of higher version.


Atanas Korchev
Telerik team
 answered on 23 Apr 2014
1 answer
239 views
I am receiving the error "Maximum call stack size exceeded" while trying to bind Signalr data to the KendoUI grid (v2014.1 416).

Here is my current code:

var epConnection = $.hubConnection();
var hub = epConnection.createHubProxy("EventsPendingHub");
var hubStart = epConnection.start();
 
$('#tblEventsPending').kendoGrid({
    sortable: true,
    columns: [
        { field: "EventNum" },
        { field: "Area" },
        { field: "Zone" },
        { field: "Priority" },
        { field: "Type" },
        { field: "TIQ" },
        { field: "Location" },
        { field: "Apt"}
    ],
    dataSource: {
        type: "signalr",
        autoSync: true,
        schema: {
            model: {
                id: "EventNum",
                fields: {
                    "EventNum": { type: "string" },
                    "Area": { type: "string" },
                    "Zone": { type: "string" },
                    "Priority": { type: "string" },
                    "Type": { type: "string" },
                    "TIQ": { type: "string" },
                    "Location": { type: "string" },
                    "Apt": {type: "string"}
                }
            }
        },
        sort: [
            { field: "Priority", dir: "desc"},
            { field: "TIQ", dir: "desc"}
        ],
        transport: {
            signalr: {
                promise: hubStart,
                hub: hub,
                server: {
                    read: "read",
                    update: "update",
                    destroy: "destroy",
                    create: "create"
                },
                client: {
                    read: "read",
                    update: "update",
                    destroy: "destroy",
                    create: "create"
                }
            }
        }
    }
});

I'm looking for setup suggestions to fix this problem or known workarounds.

Thank you.
Vladimir Iliev
Telerik team
 answered on 23 Apr 2014
1 answer
2.5K+ views
Hi,

Kendo UI Grid is reloading the data with previously selected page number. If  I moved to 10th page of the Grid and then i am reloading the Grid with recent data. Grid data  is still showing the 10th page  instead of 1'st page. How can i reload the grid with focus on  first page. 

{  
var grid = $("#grid").data("kendoGrid");  
grid.dataSource.page(1);
}
If i placed the above code before reloading, it's taking time to reload the grid.
If i placed the above code after reloading, it's hitting the sever twice.

Please suggest on this.

Thanks,
Raj Yennam
Vladimir Iliev
Telerik team
 answered on 23 Apr 2014
4 answers
962 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
347 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
195 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
694 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
151 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
350 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
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
Drag and Drop
Application
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
DropDownTree
ListBox
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
LLM Kit
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?