Telerik Forums
Kendo UI for jQuery Forum
2 answers
228 views
I have two icons within my tabstrip, one for home and one for logout.  When I navigate away from the home page, the home button is still highlighted.  I do not want this highlighted when not on the homepage.  Can anyone suggest what I need to do to fix this?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Control Panel - Mobile</title>
    <!--include Kendo UI files-->
    <link href="public/css/kendo.common.min.css" rel="stylesheet" type="text/css" />
    <link href="public/css/kendo.default.min.css" rel="stylesheet" type="text/css" />
    <link href="public/css/kendo.mobile.all.min.css"  rel="stylesheet" type="text/css" />
    <script src="public/js/jquery.min.js" type="text/javascript"></script>
    <script src="public/js/kendo.mobile.min.js" type="text/javascript"></script>
</head>
<body>
    <div data-role="view" data-layout="index_template" data-title="Control Panel - Mobile" id="index">
        <?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 (<span id="unread_messages_hp"><?=$unread_messages?></span>)</a></li>
            <li><a href="/support/listall">Support Messages (<span id="unread_support_hp"><?=$unread_support?></span>)</a></li>
            <li><a href="/reviews/listall">Customer Reviews (<span id="new_reviews_hp"><?=$new_reviews?></span>)</a></li>
            <li><a href="/orders/listall">Orders (<span id="new_orders"><?=$new_orders?></span>)</a></li>      
        </ul>
   </div>
   <div data-id="index_template" data-role="layout" data-show="triggerIndexButton">
        <div data-role="header">
            <div data-role="navbar">
                <span data-role="view-title"></span>
                  
            </div>
        </div>
       
        <div data-role="footer">
            <div data-role="tabstrip" >
                <a href="/" data-icon="home" data-rel="external">Home</a>
                <a href="/logout" data-icon="settings">Logout</a>
            </div>
        </div>
   </div>   
   <div data-id="main_template" data-role="layout">
        <div data-role="header">
            <div data-role="navbar">
                <a class="nav-button" data-align="left" data-role="backbutton" id="back">Back</a>
                <span data-role="view-title"></span>
                  
            </div>
        </div>
       
        <div data-role="footer">
            <div data-role="tabstrip">
                <a href="/" data-icon="home" data-rel="external">Home</a>
                <a href="/settings" data-icon="settings">Logout</a>
            </div>
        </div>
   </div>  
Many thanks in advance for your help.
Patrick
Top achievements
Rank 1
 answered on 01 Jun 2012
8 answers
699 views
Hi,

i have an virtual binded xml datasource in a grid. All works fine, but when the server has no records the browser has errors in Javascript because undefined values are in XML Data.

Sample:
<count>1</count><books><book><field1>Hallo</field1></book></books>  -> This works fine

But if there are no books the browser reported errors:
<count>0</count><books></books>  

Browser message:Uncaught TypeError: Cannot read property 'field1' of undefined
Adrian
Top achievements
Rank 1
 answered on 31 May 2012
1 answer
288 views
While the user is in the process of scrolling a grid, I need to prevent ajax polling else the user-experience is bad. I can't figure out how to get scroll events from a grid. My question is: to which DOM element under the grid should I bind the scroll event? I thought it would be the k-grid-content.
Gary
Top achievements
Rank 1
 answered on 31 May 2012
0 answers
171 views
I'm curious if someone can assist in pointing me to either a code snippet or suggested method to get the selected value from a KendoUI combobox within an MVC razor application.

Any help is very much appreciated.  Thanks in advance.
Karl
Top achievements
Rank 1
 asked on 31 May 2012
6 answers
374 views
I have a grid with OrderID and OrderDate. The sorting is done on the server. The initial load is sorted on the OrderID.

The grid gets the data in JSON format.
How do I specify that the sort field and direction are null then by default show the sort icon on OrderID and Default direction is ASC?

Thank you
Vin
Dave
Top achievements
Rank 1
 answered on 31 May 2012
2 answers
109 views
Hey guys, I dont' know if you're aware of this or not, but the demo source code for your mobile UI needs updating.

You guys are missing the link to the mobile style sheets - 

<link href="http://cdn.kendostatic.com/2012.1.515/styles/kendo.mobile.all.min.css" rel="stylesheet">

It took me about 45 minutes to realize my page was not working because you didn't have this in the demo source code. I didn't realize I needed this until I looked at the source code for the mobile pages here: http://demos.kendoui.com/mobile/m/index.html

Just giving you a heads up.
Jeremy
Top achievements
Rank 1
 answered on 31 May 2012
1 answer
179 views
If I have the following treeview template:-

<script id="treeview-template" type="text/kendo-ui-template">
                                # var id = item.id; #
                                # var name = item.text; #                                                 
                                # var parentId = item.parentId; # 
                               
                                 #= item.parentid #
                                 # if (item.parentid == null) { #
                                     test
                                 # } #

                               
                                <span categoryId="#= id #" class="#= parentId #">#= name #</span>
                                <input type="hidden" name="#= name #" value="#= id #" />
                        </script>

Any way for me to disable the nodes where the parentId is null?

I tried doing this without success:-
  # if (item.parentid == null) { #
  <span categoryId="#= id #" class="k-denied">#= name #</span>
# } #
 
Thanks
Gregor

Iliana Dyankova
Telerik team
 answered on 31 May 2012
0 answers
160 views
I have used custom tags like aui:column etc in template and it works like a charm. However tags like 

<liferay-ui:ratings-score score="5"></liferay-ui:ratings-score> does not work. It prints the output of this custom tag right on the top of the page.

Actually it prints the output of the above mentioned custom tag in the template as well as on the left top corner of the page
Any help ?

Muhammed Shakir
Top achievements
Rank 2
 asked on 31 May 2012
1 answer
498 views
I would like to sort my datasource by date.  However, whenever I change the field type from "string" to "date" I get "null" in place of the dates.  The format of the dates is:  dd-mm-yy hh:mm

 Can anyone see what I am doing wrong?

var ticketDataSource = new kendo.data.DataSource({
      transport: {
          read: "/support/data",
          dataType: "json",
          create: {
              url:  function() {
                  if (support_create_type == 'new'){
                      var url = "/support/newticketpost/";
                  } else if (support_create_type == 'reply'){
                    var url = "/support/reply/" + support_id + "/";
                  }                          
                   
                  return url;
              },
              type: "POST",
              dataType: "json"                   
          },
          update: {
              url:  function() {
                  if (support_update_type == 'markasread'){
                    var url = "/support/markasread/" + support_id + "/";
                  } else if (support_update_type == 'close'){
                     var url = "/support/close/" + support_id + "/" + support_ticket_closed; 
                  }
                  return url;
              },
              type: "POST",
              dataType: "json"
          },               
      },
     error: function(e) {
        alert(e.responseText);
     },
     sort: { field: "DateCreated", dir: "asc" },
   
      schema: {
        model: {
            id: "ThreadID",
            fields: {
                DateCreated:  { type: "date" },
                Subject:  { type: "string" },
                Closed:  { type: "string" }                    
               }
           }
       }
   });


Many thanks,
Lee
Top achievements
Rank 1
 answered on 31 May 2012
1 answer
5.4K+ views
I need to get the row data (firstname, lastname) from the current row from a custom command.  I need to create a vcard from the custom command and the first name, last name will be used in the back end to dynamically generate the vcard but I have been trying to extract the current row data and have so far been unsuccessful.  Here's my code....
$(function() {
    var grid = $("#grid").kendoGrid({
        dataSource : {
            pageSize:10,
            sort : {
                field : "firstname",
                dir : "asc"
            },
            transport : {
                read : "data/getemployees.php"
            },
            schema : {
                data : "data",
                total: "data.length"
            },
        },
        pageable: true,
        columns : [{
            field : "firstname",
            title : "First Name"
        }, {
            field : "lastname",
            title : "Last Name"
        }, {
            field : "cellphone",
            title : "Cell Phone"
        }, {
            field : "deskphone",
            title : "Desk Phone"
        }, {
            field : "emailaddress",
            title : "Email Address"
        },{
            command:{text:"vCard", className:"vCardButton"}, title:"vCard", width:"110px"
        }],
        sortable:true,
    });
       $("#grid").delegate(".vCardButton", "click", function(e) {
                       
                        var grid = $("#grid").data("kendoGrid");
                       
                        var myVar = grid.dataItem(grid.tbody.find(">tr"));
                       
                    });
});

any suggestions?
Alexander Valchev
Telerik team
 answered on 31 May 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
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?