Telerik Forums
Kendo UI for jQuery Forum
0 answers
105 views
Hey,
I got a web application written in c# language and I wanted to include a kendo chart in it. No problems in getting the chart running with sample data. The issue occured when I need to bind the data with a list, which is converted into a valid JSON string, but its located on the server side in my chartpage.aspx.cs page and kendo chart is in the chartpage.
aspx page. Please could someone help me with descent samples, I guess I need to make an AJAX call but not sure.
regards,
neil
Neil
Top achievements
Rank 1
 asked on 04 Oct 2012
1 answer
278 views
I have a column field named Email in a datasource of Users. When I apply a template to the field (i.e. "<a href="mailto:#=Email#">#=Email#</a>"), and I click the Add new record button on the toolbar, I get an error stating that the field named Email is undefined. When I remove the template, the create action works like it should.

Here is the code that recreates the error:
/// <reference path="_references.js" />
 
var users = [
  { Id: '0', FirstName: 'Bruce', MiddleName: 'Ethan', LastName: 'Fletcher', Email: 'fake.email@nowhere.com', BirthDate: '1/3/1986' },
  { Id: '1', FirstName: 'Sally', MiddleName: 'Mary', LastName: 'Holland', Email: 'fake.email@nowhere.com', BirthDate: '7/12/1990' }
];
 
$(function () {
  var userViewModel = new kendo.data.Model.define({
    id: 'Id',
    fields: {
      Id: { editable: false, defaultValue: '9999' },
      FirstName: { editable: true, nullable: false, validation: { required: true} },
      LastName: { editable: true, nullable: false, validation: { required: true} },
      MiddleName: { editable: true, nullable: false },
      Email: { editable: true, nullable: false, type: 'email', validation: { required: true} },
      BirthDate: { editable: true, nullable: false, type: 'date' }
    }
  });
 
  var userDataSource = new kendo.data.DataSource({
    data: users,
    schema: {
      model: userViewModel
    },
    pageSize: 5
  });
 
  $('#user_grid').kendoGrid({
    dataSource: userDataSource,
    toolbar: [{ name: 'create'}],
    columns: [
      { field: 'FirstName', title: 'First Name' },
      { field: 'MiddleName', title: 'Middle Name' },
      { field: 'LastName', title: 'Last Name' },
      { field: 'Email', title: 'Email Address', template: '<a href="mailto:#=Email#">#=Email#</a>', encoded: false }, // !! apply a template to break create !!
      { field: 'BirthDate', title: 'Birth Date', format: '{0:MM/dd/yyyy}' },
      { command: [{ name: 'edit', text: '' }, { name: 'destroy', text: ''}], title: '', width: '86px' }
    ],
    pageable: {
      refresh: true
    },
    editable: 'popup'
  });
});
Vladimir Iliev
Telerik team
 answered on 04 Oct 2012
1 answer
750 views
Is there a way to bind an observable e-mail address to the href attribute of an element?  I tried the following:
<a data-bind="{attr:{href:Email},text:Email}"></a>

But of course this lacks the needed "mailto:".

I know in Knockout you can do it like this:
<a data-bind="{attr:{href:'mailto:'+Email},text:Email}"></a>

I tried that in Kendo and it failed with an "Unrecognized string" error.

What's the best way to handle this type of binding in Kendo's MVVM setup?
Alexander Valchev
Telerik team
 answered on 04 Oct 2012
1 answer
284 views
       The following two methods for trying to programatically remove an item from a kendo dropdownlist were taken directly from Kendo forums but did not work. Both methods caused the dropdownlist to vanish entirely from the UI.   The dropdownlist is defined in the header of a kendo grid control.    I have verified that the _selectedLoosePartIndex value is good.        Have to say that so far this product has cost me weeks of additional programing time trying to do the most simple tasks imaginable.   I have no idea why it is such a popular product.   I really do not believe that you guys have even attempted to thoroughly test the API in real world applications.      
  //Method one:
var data = $('#AvailableLooseParts').kendoDropDownList().data("kendoDropDownList").dataSource.data();  
 data = data.splice(_selectedLoosePartIndex, 1);
      $('#AvailableLooseParts').kendoDropDownList().data("kendoDropDownList").dataSource.data(data);

    
// Method two:
        var ddl = $('#AvailableLooseParts').data("kendoDropDownList");
        var itemToRemove = ddl.dataSource.at(_selectedLoosePartIndex);
        ddl.dataSource.remove(itemToRemove);
        ddl.select(0);
Vladimir Iliev
Telerik team
 answered on 04 Oct 2012
3 answers
150 views
Virtual scrolling for hierarchy Grid doesn't work properly
Amend example http://demos.kendoui.com/web/grid/hierarchy.html to use virtual scrolling:
scrollable: {
    virtual:true
}
Scroll down to the last record in the Grid. Try to open details.
Details grid is hidden, not possible to scroll down to view it. 
Swas
Top achievements
Rank 1
 answered on 04 Oct 2012
3 answers
1.2K+ views
I have a fairly complex report I am creating that requires posting a bunch of JSON to a server. I have this up and running just fine with a data source. What I'm trying to do is to add server-side paging, into this process and am unsure how to proceed.

I thought it might make sense to put the paging in the query string of the URL that I'm posting the JSON to, but I can't figure out how to get the data source to accomplish this. I have turned on the server paging and set the page size properly. Does Kendo see that my read endpoint is a "POST" endpoint and just ignore adding anything to the query string? Is there a way to force it to add the current page size and page to the read URL?
William
Top achievements
Rank 1
 answered on 04 Oct 2012
0 answers
126 views
I'm trying to generate a popup for a grid that gets populated with a model that has nested models as properties.
I know the nested properties will not automatically show up in the edit popup (to my knowledge).
I tried using a custom template for the edit popup containing the additional fields that I require but this doesn't seem to work as-well.
Is it even possible to bind a hierarchical model to a (grid) popup up or must I create my own separate page for such scenarios?

Doni
Top achievements
Rank 1
 asked on 04 Oct 2012
0 answers
140 views
hello
i am using kendo tools getting stuff , i have used kendo window as confirmation box, but getting issues this comes again and again ..
Please help me..
pankaj
Top achievements
Rank 1
 asked on 04 Oct 2012
0 answers
78 views
I create a standard Kendo Grid :
GridBuilder<T> grid = helper.Kendo().Grid<T>()
                .Name(gridName)
                .DataSource(d =>
                    d.Ajax()
                    .Read(r => r.Action(string.Format("{0}GetPage", gridName), controllerName))
                    .PageSize(pageSize)
                )
                .Resizable(r => r.Columns(true))
                .Reorderable(r => r.Columns(true))
                .Pageable()
                .Selectable(select=>select.Mode(GridSelectionMode.Multiple))
                .Filterable()
                .Selectable()
                .ColumnMenu()
                .Scrollable()
                .Sortable(sort=>sort.SortMode(GridSortMode.SingleColumn))
                .Groupable()
The grid renders ok but when I try to filter the Boolean Column it looks like this



Is this a common bug or did I do something wrong ??


Nevermind...I found a solution...had to edit the .css file
Radu-Constantin
Top achievements
Rank 1
 asked on 04 Oct 2012
2 answers
221 views
I have tried my hands at the Kendo Grid example with both static array data and json data from a web service. The console shows the data returned from the web server but my grid does not display the data, although I the column headers and everything else displayed.
Please see code below:
========================================

<!DOCTYPE html>

<html>

<head>

    <title></title>

 <link href="styles/kendo.common.min.css" rel="stylesheet" type="text/css" />

<link href="styles/kendo.default.min.css" rel="stylesheet" type="text/css" />

 

<script src="js/jquery.min.js" type="text/javascript"></script>

<script src="js/kendo.web.min.js" type="text/javascript"></script>

 <script src="js/kendo.all.min.js" type="text/javascript"></script>

   <script src="js/kendo.all.min.js"></script>

    <script src="js/kendo.grid.min.js"></script>

   <script src="js/jquery-ui-1.7.3.custom.min.js"></script>

</head>

<body>

   

        <div id="example" class="k-content">

            <div id="grid"></div>

            <script>

                $(document).ready(function() {

                    $("#grid").kendoGrid({

                        dataSource: {

                                                                         

                            type: "jsonp",

                            transport: {

                                read: "http://localhost:3481/api/employees"

                                                                                              

                            },

                            schema: {

                                model: {

                                    fields: {

                                        Code: { type: "String" },

                                        Name: { type: "String" },

                                        ContactName: { type: "string" },

                                      

                                    }

                                }

                            },

                                                                                  

                         

                            serverPaging: true,

                            serverFiltering: true,

                            serverSorting: true

                        },

                        height: 250,

                      

                        sortable: true,

                        pageable: true,

                        columns: [

                               

                            {

                                field: "Code",

                                title: "ID",

                                width: 100,

                               

                            }, {

                                field: "Name",

                                title: "Name",

                                width: 200

                            }, {

                                field: "ContactName",

                                title: "Contact Name"

                            }

                        ]

                    });

                                                          

                });

            </script>

        </div>

 

 

</body>

</html>



Mahaveer
Top achievements
Rank 1
 answered on 04 Oct 2012
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
Bronze
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
Bronze
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?