Telerik Forums
Kendo UI for jQuery Forum
4 answers
187 views
I placed a table in my html:

<table id="comments">
    <tr>
        <th data-field="module"></th>
        <th data-field="author"></th>
        <th data-field="date"></th>
        <th data-field="comment"></th>
        <th data-field="status"></th>
    </tr>
</table>
and then called the grid:

$("#comments").kendoGrid();
when I run the page I get this error: Uncaught TypeError: Object #<Object> has no method 'isRtl'
I did originally have this connecting to my datasource, but I removed that to see if maybe the datasource was causing the error, but even at this bare-bones I'm still getting the issue.

I'm fairly new to Kendo so I'm not sure what else I need to supply to give you an idea of what might be wrong, so if you need more info please let me know and I'll supply it!

Thanks!
SelAromDotNet
Top achievements
Rank 2
 answered on 28 Mar 2013
5 answers
725 views
We are in the process of migrating from the MVC Extensions to the Kendo MVC wrappers.

We are using Server-side binding on grids, and in the old MVC Extensions, the basic CRUD methods passed the datakey as a generic "id" parameter, regardless of the actual key field name.  In the Kendo wrappers it uses the actual key field name, e.g. orderID.  

e.g. our old code would be something like 
(View)
.DataKeys(dataKeys => dataKeys.Add(model => model.orderId))
(Controller)
public ActionResult Delete(int id) {}

It appears we have to change them to use the actual field name, e.g.
(View)
.DataSource(source => source.Server()
....Model(model =>{model.Id(o => o.OrderID);})  )        
(Controller)
public ActionResult Delete(int orderID){}

Is there a way for me to force it to pass the field name = "id" somehow, e.g. as a parameter on the DataSource .Action ?

Also, we were using  RouteData in some of our code to pass search values back & forth.  With the Kendo MVC wrappers, the RouteData is lost between the controller & view.

Maybe I'm missing some basic difference related to RouteMaps & Kendo MVC?

Thanks for your help.
Phil
Top achievements
Rank 1
 answered on 28 Mar 2013
1 answer
96 views
Hi Guys!

Steps to reproduce:

1. Open Kendo WebDemos->MultiSelect->Basic usage sample
2. Type 'm' in multiselect, three results appear, select first one
3. Type again 'm' in multiselect, NO results display
4. Delete 'm' and retype 'm', two results display

It appears that the multiselect doesnt produce any results on subsequent same letter search.
Is this standard behavior of the Kendo MultiSelect control ?

Cheers!

Georgi Krustev
Telerik team
 answered on 28 Mar 2013
9 answers
721 views
Hi,
I built the functionality and framework for my mobile application using the MVC model prior to integrating with Kendo UI and therefore every action has it own php page. eg. view.php , delete.php, update.php, reply.php.   I didn't realise that the Kendo UI Mobile would only work with one file using views.  I had read that I can use remote views to link between pages but this doesn't seem to be working well for me.   I have read the documentation but am not sure I fully understand it or even if its correct. Can anyone help with my navigation?

I have an index page as set out below:
<div data-role="view" data-title="Control Panel">
    <div data-role="header">
        <a data-role="backbutton">Back</a>
    </div>
  <?php if (isset($error)){  echo '<p style="color:red">Error: '. $error .'</p>';} ?>
    <ul data-role="listview" data-style="inset">
        <li><a href="messages/listall">Customer Messages (<?=$unread_messages?>)</a></li>         
    </ul>
    <script>
        var listView = $("#listView").kendoMobileListView({
            pullToRefresh: true,
            appendOnRefresh: true
        });
    </script>
    <div data-role="footer">
        <div data-role="tabstrip">
            <a href="index" data-icon="/mobile_kendo/">Home</a>
            <a href="" data-icon="refresh">Refresh</a>
            <a href="settings" data-icon="settings">Settings</a>
        </div>
    </div>
   </div>
   <script>
      var app = new kendo.mobile.Application($(document.body), {
         icon: "URL to a web clip icon"
     });
 
   </script>


I have a listall page which is has the same header and footer as above and then the different central part as set out below:
<div data-role="view" data-title="Control Panel">
    <div data-role="header">
        <a data-role="backbutton">Back</a>
    </div>
<
h2>Messages</h2>
<table>
    <?php echo $unread_messages . ' - unread messages'; ?>
    <tr>
        <th>From</th><th>Intro</th><th>Date</th><th>Status</th>
    </tr>       
    <?php foreach ($messages as $message):?>
        <?php if ($message->isnew == 1){ ?>
          <tr style="font-weight:bold">
        <?php } else {  ?>
         <tr>
        <?php }  ?>
            <td><?=$message->customer_name?></td><td><a href="messages/view/<?=$message->id?>"><?=$message->message?></a></td><td><?=$message->created?></td><td><?=$message->isnew?></td>
        </tr>
    <?php endforeach?>
</table>
    <div data-role="footer">
        <div data-role="tabstrip">
            <a href="index" data-icon="/mobile_kendo/">Home</a>
            <a href="" data-icon="refresh">Refresh</a>
            <a href="settings" data-icon="settings">Settings</a>
        </div>
    </div>
   <script>
      var app = new kendo.mobile.Application($(document.body), {
         icon: "URL to a web clip icon"
     });
 
   </script>



I have a view page as below:
<div data-role="view" data-title="Control Panel">
    <div data-role="header">
        <a data-role="backbutton">Back</a>
    </div>
<
h2>Message</h2>
    <p>Date: <?=$message->message->created?></p>
    <p>From: <?=$message->message->customer_name?></p>
    <p>Email: <a href="mailto:<?=$message->message->email?>" target="_blank"><?=$message->message->email?></a></p>
    <p>Telephone: <?=$message->message->customer_telephone?></p>
    <p>Location IP:<?=$message->message->ip?></p>
    <p>Message: <?=$message->message->message?></p>
    <p><a href="../markasread/<?=$message->message->id?>/0">Mark as unread</a>  |  <a href="../delete/<?=$message->message->id?>">Delete</a></p>
    <div data-role="footer">
        <div data-role="tabstrip">
            <a href="index" data-icon="/mobile_kendo/">Home</a>
            <a href="" data-icon="refresh">Refresh</a>
            <a href="settings" data-icon="settings">Settings</a>
        </div>
    </div>
   </div>
   <script>
      var app = new kendo.mobile.Application($(document.body), {
         icon: "URL to a web clip icon"
     });
 
   </script>


My Issues are:
1)  When I select theCustomer Messages link on the index page (messages/listall), the # is added automatically to the URL and is causing issues.

2) On the listall page, I select a message in the list and this does not put the # in front of the URL.  This takes me to the view page but does not have the styling of the application applied.  Why is this?

3)  When I select the back button its adds the #, this sometimes works and sometimes doesn't depending on what page Im on.  How can I get it to work for all pages?

4)  As the code from the different pages is being appended to the main index page, when I perform an action, this is executed multiple times and I only want it to perform the operation once. 

Any help would be much appreciated.
Iliana Dyankova
Telerik team
 answered on 28 Mar 2013
1 answer
167 views
Is there a way to just pass content to a window instead of having the window load its data from the element used to initialize it? Right now I'm displaying a window after a user clicks a help link like this:

deleteAttribute = function(evt){
  evt.preventDefault();
  $(evt.target).kendoWindow({
    position: "right",
    height: '100px',
    title: 'Confirm Deletion',
    width: '325px'
  });
  var win = $(evt.target).data('kendoWindow');
  win.content(Mustache.to_html($('#confirmDeleteAttributeTemplate').html(), {id: $(evt.target).closest('li.attribute').attr('id')}));
  win.open();
  win.center();
};

I  want the window to position itself near the delete link...that's why I want to use evt.target to initialize the window. The content of the delete link is an icon. Passing in content using the content method appends the content to the window instead of overwriting it. The window also removes the event target from the DOM???

*** Update
I am now using this code:
deleteAttribute = function(evt){
  evt.preventDefault();
  var win = $('.window').data('kendoWindow');
  if(!win) {
    $('.window').kendoWindow({
      title: 'Confirm Deletion',
      width: '325px',
      height: '100px'
    })
    .data('kendoWindow');
    win = $('.window').data('kendoWindow');
  }
  else {
    win.close();
    win.setOptions({
      title: 'Confirm Deletion',
      width: '325px',
      height: '100px'
    });
  }
  win.content(Mustache.to_html($('#confirmDeleteAttributeTemplate').html(), {id: $(evt.target).closest('li.attribute').attr('id')}));
  win.center();
  win.open();
};
There are more than one link on the page to open a window, so I check for the kendoWindow object first. I think centering the window in the viewport looks the best, but for some reason if this function creates and opens the window, it is centered relative to the document. If this function opens an existing window instead, it is centered in the viewport correctly. Even if the function creates and opens the windows, subsequent invocations center the window in the viewport. I must be missing something here.
Dimo
Telerik team
 answered on 28 Mar 2013
1 answer
27 views
Is there a way i can draw Trend Lines on the StockChart control?
Iliana Dyankova
Telerik team
 answered on 28 Mar 2013
11 answers
683 views
Hi All

In my application we are using backbone.js for MV* type functionality.  IT performs navigation events based on hash (#) in a URL.  So for example entering in #profile brings up your profile.  We are using a KendoUI template in a grid (since I couldn't get other templates to work right).  Is there anyway to escape a # that may appear in the template?
Atanas Korchev
Telerik team
 answered on 28 Mar 2013
1 answer
64 views
I have a line chart that displays some data, this data is collected on a daily basis, so currently I have a chart point for each day. That works fine, however as this data increases I will have some  data sets with many weeks or months worth of data, where as others will only have a few days worth.

What I would like to do is have the chart deal with this dynamically, so if I have, say, over 4 weeks of data, then it should only plot a point for each week (and make this an average of the daily data for that week). If it is less than 4 weeks, plot a point for each day.

Is there an easy way to do this with the charting component, rather than having to pre -process the data before it gets there?

I am using the MVC wrapper.
T. Tsonev
Telerik team
 answered on 28 Mar 2013
1 answer
318 views
I would like to implement server paging so I retrieve a subset of data (50 records) from the server a put it into an observable array called self.grdTableData. I then create a Kendo DataSource as follows:

                  var grdTableResults = $("#grdTableResults").data("kendoGrid");

                    var ds = new kendo.data.DataSource({                      
                        data: self.grdTableData, //observableArray
                        serverPaging: true,
                        pageSize: 50,
                        total: joOutput["TotalRecords"], // total count of all data retrieved from table
                        schema: {
                            data: "data",
                            total: "total"
                        }
                    });

                    grdTableResults.setDataSource(ds);

However, when I set the data source, my grid contains the first page of data, but has a rotating stream of circles like it is waiting for something to finish. Further investigating revealed that there was actually an "Uncaught TypeError: cannot read property length of undefined" which pointed to line 4690 of kendo.web.js v2012.3.1114. So I'm wondering what the the value "array" is (any why it's undefined) in this instance with reference to how my data source is being constructed and what, if anything, I'm missing, or misconfiguring while I'm creating the data source so that I can use server paging. Any comments, suggestions, or insights on this are greatly appreciated. Thanks!



Petur Subev
Telerik team
 answered on 28 Mar 2013
1 answer
137 views
I having a problem with the cascade combobox.  Here is the code with the json file.  I get undefined in the dropdown lists

            <div class="demo-section">
                <h2>View Order Details</h2>
                <p>
                    <label for="categories">Categories:</label><input id="categories" style="width: 300px" />
                </p>
                <p>
                    <label for="products">Products:</label><input id="products" disabled="disabled" style="width: 300px" />
                </p>
                <p>
                    <label for="orders">Orders:</label><input id="orders" disabled="disabled" style="width: 300px" />
                </p>

                <button class="k-button" id="get">View Order</button>
            </div>

            <style scoped>
                .demo-section {
                    width: 460px;
                    padding: 30px;
                }
                .demo-section h2 {
                    text-transform: uppercase;
                    font-size: 1.2em;
                    margin-bottom: 30px;
                }
                .demo-section label {
                    display: inline-block;
                    width: 120px;
                    padding-right: 5px;
                    text-align: right;
                }
                .demo-section .k-button {
                    margin: 20px 0 0 125px;
                }
                .k-readonly
                {
                    color: gray;
                }
            </style>

            <script>
                $(document).ready(function() {
                    var categories = $("#categories").kendoComboBox({
                        placeholder: "Select category...",
                        dataTextField: "categories",
                        dataValueField: "id",
                        dataSource: {
                            type: "json",
                            serverFiltering: true,
                            transport: {
                                read: "datasources/categories.json"

                            }
                        }
                    }).data("kendoComboBox");

                    var products = $("#products").kendoComboBox({
                        autoBind: false,
                        cascadeFrom: "categories",
                        placeholder: "Select product...",
                        dataTextField: "ProductName",
                        dataValueField: "Productsku",
                        dataSource: {
                            type: "json",
                            serverFiltering: true,
                            transport: {
                                read: "datasources/offerProducts.json"
                            }
                        }
                    }).data("kendoComboBox");


JSON

[{
    "categories": "Discount",
    "id": 1,
}, {
    "categories": "Points",
    "id": 2,
}, {
    "categories": "Member Status",
    "id": 3,
}, {
    "categories": "Charity",
    "id": 4,
}, {
    "categories": "Special Occasions",
    "id": 5,
}]
Dimiter Madjarov
Telerik team
 answered on 28 Mar 2013
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?