Telerik Forums
Kendo UI for jQuery Forum
0 answers
168 views
Hi all.

I've faced to the problem with TabStrip and DataSource. After binding TabStrip to some simple datasource, it displays nothing, but if I bind these data to the ComboBox - it works great. Here is the code:
<div id="variantTabs"></div>
<div id="comboBox"></div>
 
<script src="http://code.jquery.com/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="kendoUI/js/kendo.all.js" type="text/javascript"></script>
<script type="text/javascript">
    function Variant(_name,_id,_content){
        this.text=_name;
        this.id=_id;
        this.content=_content;
    }
     
    function VariantsViewModel(){
     
        var VariantsList=[
            new Variant("first","1",""),
            new Variant("second","2",""),
            new Variant("third","3","")
        ];
         
        var localDataSource = new kendo.data.DataSource({data: VariantsList});
         
 
         
        $("#variantTabs").kendoTabStrip({
            dataSource:localDataSource
        });
         $("#comboBox").kendoComboBox({
            index: 0,
            dataTextField: "text",
            dataValueField: "id",
            dataSource:localDataSource
         });
         
    }
    $(function(){VariantsViewModel();});
 
     
 
</script>

Any help would be appreciated.
Thanks.
OgOJack
Top achievements
Rank 1
 asked on 03 Feb 2012
4 answers
125 views
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SortingIssue.aspx.cs" Inherits="CMCKendoUI.Web.SortingIssue" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Sorting Issues</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script src="js/jquery.tmpl.min.js" type="text/javascript"></script>
    <script src="js/kendo.all.js" type="text/javascript"></script>
    <link href="styles/kendo.common.css" rel="stylesheet" type="text/css" />
    <link href="styles/kendo.default.css" rel="stylesheet" type="text/css" />
</head>
<script type="text/javascript">

    var firstNames = ["Nancy", "Andrew", "Janet", "Margaret", "Steven", "Michael", "Robert", "Laura", "Anne", "Nige"],
    lastNames = ["Davolio", "Fuller", "Leverling", "Peacock", "Buchanan", "Suyama", "King", "Callahan", "Dodsworth", "White"],
    cities = ["Seattle", "Tacoma", "Kirkland", "Redmond", "London", "Philadelphia", "New York", "Seattle", "London", "Boston"],
    titles = ["Accountant", "Vice President, Sales", "Sales Representative", "Technical Support", "Sales Manager", "Web Designer",
    "Software Developer", "Inside Sales Coordinator", "Chief Techical Officer", "Chief Execute Officer"],
    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 createRandomData(count) {
        var data = [], now = new Date();
        for (var i = 0; i < 50; i++) {
            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();

            data.push({
                Id: i + 1,
                FirstName: firstName,
                LastName: lastName,
                City: city,
                Title: title,
                BirthDate: birthDate,
                Age: age
            });
        }
        return data;
    }

    var KendoGridModel = kendo.data.Model.define({ id: 'Id' });
    $(document).ready(function ($) {
        var ctlGrid = $("#gridDiv");
        ctlGrid.kendoGrid({
            dataSource: {
                data: createRandomData(50),
                pageSize: 5
            },
            schema: { model: KendoGridModel },
            selectable: true,
            //sortable:false,
            //sortable: { mode: 'single', allowUnsort: false },
            pageable: true
        });
    });
</script>


<body>
    <form id="form1" runat="server">
        <div id="gridDiv" runat="server" />
    </form>
</body>
</html>

For the above code, I cant get the grid rendered in FIrefox (10.0) till the time I comment out the sortable attribute. Its working fine in IE (7 to 9) But I want my grid to be rendered with the sortable attribute in addition to allowunsort attribute. Can you guide me how can I get the needed functionality?

Thanks & Regards,
Manoj Kapoor
Manoj Kapoor
Top achievements
Rank 2
 answered on 03 Feb 2012
0 answers
77 views
 hi,


I am using kendo template to display some fields data from the datasource into a table. I have a hyperlink on one of the elements that pops up a window.
Am able to pull the data propery, but the popup window doesnt popup- instead displays on same page at the top.
following is my code inside the td that has a link
<td> <a href="javascript:toggle5();" id="window5"  class="k-group Property " >
       #=name # 
    </a> </td> What can i change to make the window popup. thanks in advance.
         
Rahul
Top achievements
Rank 1
 asked on 03 Feb 2012
1 answer
48 views
hi,

i have some thing like date d'échéance as column header title, then it is failing. I tried replacing the single codes with 96 & it is displaying correct. But, when i drag that column header for grouping, it is getting truncated  to date d.

Please help me on this.  
Nikolay Rusev
Telerik team
 answered on 03 Feb 2012
4 answers
325 views
Hi.

Is it possible to use HTML 5 local storage as a backend of the Kendo UI datasource? I couldn't find any examples on how to do this.

If it isn't possible, is this considered in the roadmap?

Br,
Timo Westkämper
raj
Top achievements
Rank 1
 answered on 03 Feb 2012
3 answers
819 views
I have created a grid and I have needed to use a template to create the toolbar. I want to be able to batch edit then save back to the server.

If I weren't using a template I could simply use
  toolbar: ["create", "save", "cancel"],

To do what I need, however I need the template as I have a dropdown box in the toolbar and some other html.

How do I tap into these events from a control inside my custom toolbar?

Any help would be great!

Rosen
Telerik team
 answered on 03 Feb 2012
1 answer
173 views
I want to bind the data object written from the Sharepoint BCS to KendoGrid used in Sharepoint webpart. Also, according to my knowledge to bind kendo grid the data should be in json format. If this is correct then how to convert the data from BCS into JSON and then bind it to KendoGrid on client side?
Atanas Korchev
Telerik team
 answered on 03 Feb 2012
0 answers
416 views
Hello
     I have a requirement where I ll do a $.ajax call and then store the ajax call response to a kendo datasource...like below
   $.ajax({
                url: url,              
                type: 'POST',
                contentType: 'application/json',
                dataType: 'json',
                success: function (responsedatas) {
                     ///I got datas here..If i put debugger im able to see the datas
                      var KendoSource = new kendo.data.DataSource({ data: responsedatas});
                       $("#grid").kendoGrid({
                    dataSource: {
                        data: KendoSource
                    },
                    height: 360,
                    groupable: false,
                    scrollable: false,
                    sortable: false,
                    pageable: false,
                    columns: [{
                        field: "ContactID",

                        title: "ContactID"
                    }]
                });
                }
            });

If i do the above code...My grid doesn't have datas... If i give the responsedatas directly to the grid data..IM able to get the grid properly..But i wanna use kendosource..I was testing this kendosource to work..I have lots of requirements on kendosource...

raj
Top achievements
Rank 1
 asked on 03 Feb 2012
3 answers
1.3K+ views
How do I select the first first node in a kendo treeview?

Thanks!
Rafi
Top achievements
Rank 1
 answered on 03 Feb 2012
0 answers
86 views
Hi All, 

Can it be possible to add a "search" toolbar in Grid. It will have and text input and will search through data source. 

Thanks.
Greffin
Top achievements
Rank 1
 asked on 03 Feb 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
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?