Telerik Forums
Kendo UI for jQuery Forum
2 answers
284 views

i want to use dataviz and web controls in the same page,so i add
<script src="kendo.web.min.js"></script>
<script src="kendo.dataviz.min.js"></script>

in my html page.

 when i creating kendogrid with datasource such as

var dataSource = new kendo.data.DataSource({
             transport: {
                 read:  {
                     url: "getOperatorsByOrg.do?format=json&orgid=2",
                     dataType: "json"
                 }
             },
             batch: true,
             pageSize: 30,
             schema: {
              model: {
                   fields: {
                    userid: { editable: false, nullable: true },
                    operatorname: { editable: false },
                    password: { editable: false }
                   }
                 }
             }
         });

      $("#"+divname).kendoGrid({
          dataSource: dataSource,
          pageable: true,
          height: 300,
          toolbar: ["create"],
          columns: [
                 { field:"userid",title:"userid" },
                 { field: "operatorname",title:"operatorname", width: "150px" },
                 { field: "password", title:"password", width: "150px" }]
      });

a javascript error is showed:

message: 'undefined' is null or is not an object
row: 8
char: 45249
code: 0
URI: http://localhost:8080/reportproject/views/js/kendo/kendo.web.min.js

and the data in grid can't be showed

 when i delete the "<script src="kendo.dataviz.min.js"></script>"
the data can be showed very good

how i can do?

Zhipan
Top achievements
Rank 1
 answered on 09 Aug 2012
3 answers
228 views
Hi,

I'm reopening a window with new content, but I can't figure out how to change the dimensions of it.

How do I accomplish this?
David
Top achievements
Rank 1
 answered on 09 Aug 2012
1 answer
603 views
Hey,

Is there an easy way to change the direction of the k-callout-n arrow on the validation message, or to remove it entirely?

Any help would be greatly appreciated!
Alexander Valchev
Telerik team
 answered on 09 Aug 2012
1 answer
108 views
I have a basic example like the tap strip demo [ http://demos.kendoui.com/mobile/tabstrip/index.html ]

When I run it in eclipse with the simulator, it moves the tap strips to the top and content does not fit within the phone display.
There is about a 3-4 pixel white area around the application and has both a horizontal and vertical scrolling.

Thanks for any advice...
Petyo
Telerik team
 answered on 09 Aug 2012
1 answer
192 views
Hi,

I'm facing a problem with the render of my internal views background, in a PhoneGap iOS application using Kendo. Here is a code demo of my problem:

<!DOCTYPE html>
<html>
    <head>
        <title>Test</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
        <meta charset="utf-8" />
        <!-- ********** JS ********** -->
        <script src="js/cordova-2.0.0.js" type="text/javascript" charset="utf-8"></script>
        <script src="js/jquery.min.js"></script>
        <script src="js/kendo.all.min.js"></script>
        <!-- ********** CSS ********** -->
        <link rel="stylesheet" href="styles/kendo.mobile.all.min.css" type="text/css" />
    </head>
    <body>
        <!-- ********** Login View ********** -->
        <div data-role="view" id="loginView" data-title="Login">
            <div id="form" >
                <header data-role="header">
                    <div data-role="navbar">
                        <span data-role="view-title"></span>
                    </div>
                </header>
                <ul data-role="listview" data-style="inset" data-type="group">
                    <li>
                        <label for="txtLogin">Login</label><br/>
                        <input id="txtLogin" name="txtLogin" maxlength="20" type="text"/>
                    </li>
                    <li>
                        <a data-role="button" id="btnSubmit" data-icon="globe">Connect</a>
                    </li>
                </ul>
            </div>
        </div>
         
        <!-- ********** Another View ********** -->
        <div data-role="view" id="otherView">
            <header data-role="header">
                <div data-role="navbar">
                    <span data-role="view-title" data-bind="text: userName"></span>
                </div>
            </header>
            <ul data-role="listview" data-style="inset" data-type="group">
                <li>
                    <span data-bind="text: userName"></span>
                </li>
                <li>
                    <span>Displayed?</span>
                </li>
            </ul>
        </div>
         
        <script>
            var app = new kendo.mobile.Application($(document).body, {
                                                   transition: 'slide'
                                                   });
             
            var viewModel = kendo.observable({
                                             userName: null
                                             });
             
            $("#btnSubmit").click(function() {
                                  viewModel.userName = $("#txtLogin").val();
                                  app.navigate("#otherView");
                                  kendo.bind($("#otherView"), viewModel);
                                  });
       </script>
    </body>
</html>


In the "loginView", the view's background & control are correctly displayed.
But when you navigate to the view "otherView" (by entering a text in the textbox and clicking on the Submit button), the controls aren't visible...
And when I remove the <ul> & <li> tags from this second view, I lose the "iOS-like" background of the view naturally but the controls are visible, like in this second test:

<!DOCTYPE html>
<html>
    <head>
        <title>Test2</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
        <meta charset="utf-8" />
        <!-- ********** JS ********** -->
        <script src="js/cordova-2.0.0.js" type="text/javascript" charset="utf-8"></script>
        <script src="js/jquery.min.js"></script>
        <script src="js/kendo.all.min.js"></script>
        <!-- ********** CSS ********** -->
        <link rel="stylesheet" href="styles/kendo.mobile.all.min.css" type="text/css" />
    </head>
    <body>
        <!-- ********** Login View ********** -->
        <div data-role="view" id="loginView" data-title="Login">
            <div id="form" >
                <header data-role="header">
                    <div data-role="navbar">
                        <span data-role="view-title"></span>
                    </div>
                </header>
                <ul data-role="listview" data-style="inset" data-type="group">
                    <li>
                        <label for="txtLogin">Login</label><br/>
                        <input id="txtLogin" name="txtLogin" maxlength="20" type="text"/>
                    </li>
                    <li>
                        <a data-role="button" id="btnSubmit" data-icon="globe">Connect</a>
                    </li>
                </ul>
            </div>
        </div>
         
        <!-- ********** Another View ********** -->
        <div data-role="view" id="otherView">
            <header data-role="header">
                <div data-role="navbar">
                    <span data-role="view-title" data-bind="text: userName"></span>
                </div>
            </header>
            <span data-bind="text: userName"></span>
            <span>Displayed?</span>
        </div>
         
        <script>
            var app = new kendo.mobile.Application($(document).body, {
                                                   transition: 'slide'
                                                   });
             
            var viewModel = kendo.observable({
                                             userName: null
                                             });
             
            $("#btnSubmit").click(function() {
                                  viewModel.userName = $("#txtLogin").val();
                                  app.navigate("#otherView");
                                  kendo.bind($("#otherView"), viewModel);
                                  });
            </script>
    </body>
</html>

Does anyone know the reason of this problem please?

UPDATE: when I remove all things around the view-model binding in the code, there is no more problem, like with this test code:
<!DOCTYPE html>
<html>
    <head>
        <title>Test</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
        <meta charset="utf-8" />
        <!-- ********** JS ********** -->
        <script src="js/cordova-2.0.0.js" type="text/javascript" charset="utf-8"></script>
        <script src="js/jquery.min.js"></script>
        <script src="js/kendo.all.min.js"></script>
        <!-- ********** CSS ********** -->
        <link rel="stylesheet" href="styles/kendo.mobile.all.min.css" type="text/css" />
    </head>
    <body>
        <!-- ********** Another View ********** -->
        <div data-role="view" id="otherView" data-title="other">
            <header data-role="header">
                <div data-role="navbar">
                    <span data-role="view-title"></span>
                </div>
            </header>
            <ul data-role="listview" data-style="inset" data-type="group">
                <li>
                    <span>Displayed?</span>
                </li>
                <li><a data-role="button" id="btnSubmit2" data-icon="globe">Connect</a></li>
            </ul>
        </div>
 
        <!-- ********** Login View ********** -->
        <div data-role="view" id="loginView" data-title="Login">
            <div id="form" >
                <header data-role="header">
                    <div data-role="navbar">
                        <span data-role="view-title"></span>
                    </div>
                </header>
                <ul data-role="listview" data-style="inset" data-type="group">
                    <li>
                        <label for="txtLogin">Login</label><br/>
                        <input id="txtLogin" name="txtLogin" maxlength="20" type="text"/>
                    </li>
                    <li>
                        <a data-role="button" id="btnSubmit" data-icon="globe">Connect</a>
                    </li>
                </ul>
            </div>
        </div>
         
        <script>
            var app = new kendo.mobile.Application($(document).body, {
                                                   transition: 'slide'
                                                   });
             
            $("#btnSubmit").click(function() {
                                  app.navigate("#otherView");
                                  });
 
            $("#btnSubmit2").click(function() {
                                  app.navigate("#loginView");
                                  });
            </script>
    </body>
</html>

It seems that view-model binding with content controls (the "kendo.bind(...)" instructions) breaks the content render of data-role="listview" data-style="inset" blocks :(
Eva
Top achievements
Rank 1
 answered on 09 Aug 2012
4 answers
296 views
Hi All,
I have a panel bar that's populated with cities as the headers and different locations as the child elements (from JSON).  What I want to do is expand the last selected header based off of the city name once the panel bar is repopulated with new data.  I'm able to capture the last selected header and parse the city name from it however I cannot figure out how to use it to find the header I need and re-expand it.  I hope this makes sense to someone.

Thanks,
Casey
John DeVight
Top achievements
Rank 1
 answered on 09 Aug 2012
0 answers
144 views
Hi, i have the following MVVM bound grid:

<div id="grid"   data-role="grid"
    data-bind="source: contacts_Listing_ViewModel.grid_Datasource, visible: isListingVisible"
    data-editable="false"
    data-columns='["FirstName","LastName", "DepartmentName"]'    
    data-pageable="true"
    data-autoBind="false"
     style="height:100%;width:100%"></div>

How do I stop the datasource from loading data into the grid automatically (I think data-autobind = false did it)?

I want data to only be loaded into the grid when I do: contacts_Listing_ViewModel.grid_Datasource.read

Any ideas?

Thanks
Matt
Top achievements
Rank 1
 asked on 08 Aug 2012
3 answers
246 views
I have successfully created a grid using the MVVM pattern. It works great. However, what I'm struggling with is how to use the Grid with a combination of MVVM and the configuration and api methods available from Kendo UI.

For example, I am trying to create a detail row from a master row. The examples don't allow me to do that. Should I be doing something different when coding with this paradigm?
axwack
Top achievements
Rank 1
 answered on 08 Aug 2012
2 answers
393 views
Hey all,

I hit a confusion point recently when working with KendoUI controls inside of forms. 

Lets say I have today's date in my ViewBag (e.g. ViewBag.startDate exists with a valid date).

I've generated this control with the ASP.NET MVC kendo UI:
@Html.Kendo().DatePicker().Name("startDate").Value(@ViewBag.startDate).Format("d")

On the initial form post, this works fine.

Lets say I submit a form, causing a postback that changes the value of "startDate" in my ViewBag (on the server side).
If I print the ViewBag's startDate and then below it, generate my DatePicker control in the same way fashioned above, I get 2 different dates.  The printed one is whatever the server side changed it to, and the Kendo control has the first ViewBag.startDate.

As soon as I generate my control like this (e.g. without the "@" in front of ViewBag):
@Html.Kendo().DatePicker().Name("startDate").Value(ViewBag.startDate).Format("d")
everything seems to be fine between form posts.

This confused me for a good long while yesterday.  Does anyone know why this is?  I'm thinking it's some Razor knowledge that I may be lacking, but I'd think if it worked with or without the "@" on any attempt, it would work on every attempt.

Thanks for any help on why this is!

-Sig
Sig
Top achievements
Rank 1
 answered on 08 Aug 2012
1 answer
172 views
Hello, first excuse me for my bad english. 

Im working with kendoGrid without any problems at webkit based browsers like Chrome or Safari, but when I test the webpage at IE or FF it seems to have some rendering issues with the width of headers and columns. I attach screenshots of both tests and the code snippet.

Thanks 
$("#list_contactos").kendoGrid({                   
    columns: [
    {title: "Móvil", field: "_movil",width: 90},
    {title: "Apellido1", field: "_ape1",width: 150},
    {title: "Apellido2", field: "_ape2",width: 150},
    {title: "Nombre", field: "_nombre",width: 150}
    ],
    dataSource: ds,
    change: function(e) {
        //handler para manejar la seleccion de filas
        var fila = this.dataItem(this.select());
         
        if(fila == null)
            return;
         
        $("#txtMovil").val(fila._movil);
        $("#txtNombre").val(fila._nombre);
        $("#txtApellido1").val(fila._ape1);
        $("#txtApellido2").val(fila._ape2);
         
         
    },
    selectable: "row",
    scrollable: true,
    height: 450   
});
Angel
Top achievements
Rank 1
 answered on 08 Aug 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
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
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
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
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
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?