Telerik Forums
Kendo UI for jQuery Forum
2 answers
768 views
Hello:

I have a layout page with 4 absolute positioned divs, Header 1, Header 2, Content, and Footer.
Header 1 & 2, and Footer are sticky divs, only the Content div can scroll vertically.

I put the Menu on Header 1, the expanded menu is hidden behind the Header 2.
Here is my html layout

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <link href="styles/kendo.common.min.css" rel="stylesheet" />
    <link href="styles/kendo.default.min.css" rel="stylesheet" />
    <link href="styles/layout.css" rel="stylesheet" />
    <script src="js/jquery.min.js"></script>
    <script src="js/kendo.all.min.js"></script>
</head>
<body>
<div id="secHeader1">
    header 1
    <div style="width: 120px; float:right;">
        <ul id="menu">
            <li>
                Products
                <ul>
                    <li>Furniture</li>
                    <li>Decor</li>
                    <li>Storage</li>
                    <li>Lights</li>
                </ul>
            </li>
        </ul>
        <script>
            $(document).ready(function() {
                $("#menu").kendoMenu();
            });
        </script>
    </div>
</div>
<div id="secHeader2">
    header 2
</div>
<div id="secContent">
    content body
</div>
<div id="secFooter">
    footer
</div>
 
</body>
</html>


and here is the Layout.css

* {margin:0; padding:0;}
html, body, form {margin:0; padding:0; height: 100%; color:#ffffff;}
html>body>form {position:absolute; width:100%;}
 
 
#secHeader1 {
position:absolute; overflow:hidden;  
width:100%; height:75px;
left:0; top:0px; background-color:#8a0000;}
 
#secHeader2 {
position:absolute; overflow:hidden;  
width:100%; height:75px;    
left:0; top:75px; background-color:#666666;}
 
#secContent {
position:absolute; overflow:hidden;  
width:100%;                 
left:0; top:150px; bottom:31px; background-color:#0c0c0c;}
 
#secFooter  {
position:absolute; overflow:hidden;  
width:100%; height:30px;    
left:0; bottom:0;                  
background-color:#606060; border-top:1px solid #a0a0a0;}
I've tried to set z-index on secHeader1, .k-menu .k-animation-container, etc, none of them worked.

Please advise.
Thank you
HSO
Top achievements
Rank 2
 answered on 04 Apr 2013
8 answers
307 views
Hi Support

I have this very annoying issue using the following Button:
<a id="btb1" data-role="button" style="background-color: green; width:90%;" data-click="action" data-name="Stuff & Stuff" data-id="1" data-unit="Unit" data-unitid="1" class="km-button">
 <span class="km-text">DONT CLICK ME</span>
</a>
When clicking on the text in the Button, the Button changes to its hover-style but the action is not happening. Clicking on the outside of the text fires the click-event properly. The span around the text is generated automaticly.

I'm now trying to find a workaround, but this needs a fix asap - for sure.
Thanks
Alexander Valchev
Telerik team
 answered on 04 Apr 2013
2 answers
191 views
Hi everyone, 

I'm trying to handle various grid events.   The grid is setup to use in-line mode editing.  For the most part, everything works good, except for the cancel event on the grid (which should be fire when the user cancels in edit mode in the grid).  Although the documentation lists it as a valid event (http://docs.kendoui.com/api/web/grid#events-cancel),  it is not firing for me.  The change, remove, and save events all fire as expected.  Is this a bug or is something special about this Cancel event?

my grid initialization looks like this:
 
       <table id="jobs" 
               data-role="grid" 
               data-bind="source: jobsList, events: { change: gridChange, cancel: gridCancel, remove: gridRemove, save: gridSave}"
               data-columns="[{ field: 'Id', width: 50, title: 'Id', filterable: true}, { field: 'Name', width: 80, title: 'Name', filterable: true}, { field: 'Description', width: 150, title: 'Description', filterable: true},{ command: ['edit','destroy'], title: '' }]"  
               data-toolbar="[{ name: 'create', text: 'Add new job'}]"
               data-pageable="true"
               data-editable="{mode: 'inline', confirmation: 'Are you sure you want to delete this job?  It will not be recoverable'}"
               data-sortable="true"
               data-column-menu="false"
               data-resizable="true"
               data-selectable="true"
               data-filterable="{ extra: false, operators: { string: { startswith: 'Starts with', eq: 'same as',  neq: 'different' }, number: {eq: '==',  neq: '!=' , gt: '>', lt: '<'}}}"
            >
        </table>

and then i have an observable that the gird gets bound to that implements these methods:

       gridChange: function (eventArgs) {
            //do something
        }, 
        gridRemove: function(eventArgs) {
            //do something 
        }, 
        gridCancel: function(eventArgs) {
            //do something
        },
        gridSave: function(eventArgs) {
            //do something
        }

Again, the change, save, and remove events fire fine but the cancel does not fire.

Any help would be greatly appreciated,

thanks,
Florence
Florence
Top achievements
Rank 1
 answered on 04 Apr 2013
1 answer
177 views
Hello all,

I have the following below which is my detail template for my main grid.   The tab attachments has a grid in it.  I want to place an update control after the detail attachments grid.  I tried adding it in a few places but I get an error "Invalid Template" anywhere I try and place it.  Below is the code for the detail template and also below that the form I have on another view that works fine.:

<script id="template" type="text/kendo-tmpl">
@(Html.Kendo().TabStrip()
.Name("tabStrip_#=CustomerNumber#")
.SelectedIndex(0)
.Animation(animation => animation.Open(open => open.Fade(FadeDirection.In)))
.Items(items =>
{
items.Add().Text("Attachments").Content(@<text>
@(Html.Kendo().Grid<ABC.DataModel.Document.DocumentModel>()
.Name("grid_#=CustomerNumber#")
.Columns(columns =>
{
columns.Bound(p => p.DocumentType).Width(40).Title("Type").ClientTemplate("\\#=RenderImage(data)\\#");
columns.Bound(p => p.DocumentName).ClientTemplate(@Html.ActionLink("\\#=DocumentName\\#", "DownloadFile",
new { ID = "\\#=DocID\\#", fileRef = "\\#=FileRef\\#", fileName = "\\#=DocumentNameExt\\#" }).ToHtmlString());
columns.Bound(p => p.ModifiedDate).Format("{0:M/dd/yyyy h:mm tt}").Title("Modified");
columns.Bound(p => p.ModifiedBy).Title("Modified By");
columns.Bound(p => p.LatestVersion).Title("Latest Version");
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("CustomerAttachments_Read", "Customers", new { library = "Customers", folder = "#=CustomerNumber#" }))
)
.Sortable()
.ToClientTemplate())
</text>
);
})
.ToClientTemplate()
)
</script>

//I want to place this below the grid in the tab also not sure how to pass two params id and folder.  Below the sample only has id.

@(Html.Kendo().Upload()
.Name("attachments")
.Async(async => async
 .SaveUrl(@Url.Action("FileUpload"))
.AutoUpload(true)
 ).Events(e => e
.Upload(@<text>
function(e) {
e.data = { id: $("#Id").val() };
}
</text>)
)
)

Petur Subev
Telerik team
 answered on 04 Apr 2013
0 answers
175 views
Hello,

The Upload official release (Q1 2013 and earlier) is not compatible with jQuery 1.9.x

The problem is limited to asynchronous mode only. An error is thrown when the server returns an empty response. As a workaround, you can return an empty JSON object with content type set to "text/plain".

Users are urged to update to the latest hotfix version (2013.1.327+) as part of the jQuery upgrade process.

Apologies for the caused inconvenience.
Kendo UI
Top achievements
Rank 1
 asked on 04 Apr 2013
1 answer
113 views
Hi,

I'm using the mvc wrappers and getting a javascript error when clicking the create button.  I'm using jquery 1.9.1, ive tried 1.8.1 and get same error.  Here's my razor markup.  Anyone know whats going on here?  

The js error is in the image but the message is "Uncaught TypeError: Cannot read property 'Name' of undefined.

@(Html.Kendo().Grid<PosAdmin.Areas.Config.Models.ConfigProject>()
    .Name("grid")
    .Columns(c =>
    {
        c.Bound(m => m.Description);
        c.Bound(m => m.Id);
        c.Bound(m => m.Team.Name);
        c.Bound(m => m.Name);
        c.Bound(m => m.Team.Description);
        c.Command(command => { command.Edit(); command.Destroy(); }).Width(160);
    })
    .ToolBar(toolbar => toolbar.Create())
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable()
    .Sortable()
    .Scrollable()
    .HtmlAttributes(new { style = "height:430px;" })
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(20)
        .Model(model => model.Id(p => p.Id))
        .Create(update => update.Action("CreateProject", "ConfigEditor",new {Area="Config"}))
        .Read(read => read.Action("ProjectsRead","ConfigEditor",new {Area="Config"}))
        .Update(update => update.Action("EditingInline_Update", "Grid"))
        .Destroy(update => update.Action("EditingInline_Destroy", "Grid"))
    )
)
Petur Subev
Telerik team
 answered on 04 Apr 2013
1 answer
67 views
Can  you tell me if "Installing the Kendo UI for ASP.net MVC VS Extensions" accomplishes the same thing as "Manually adding the  Kendo UI to ASP.net MVC applications" ?

As described here...
http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/introduction

Thanks !
Sebastian
Telerik team
 answered on 04 Apr 2013
1 answer
68 views
I have JSON from which I create a chart. In JSON, I've got array of objects, each object containing several arrays of numeric values and some other properties like:

"rows": [
  {
   "handling": [8616.2759999999998, 7095.1799999999994, 6916.5359999999991],
"name": "XXX",
"weight": [13.388057013625801, 27.4987252294945, 3.9746104136942266],
"color": "#265A6A",
"data": [2872.0920000000001, 2365.0599999999999, 2305.5120000000002],
},
{ ..}
]

In createChart() function I can set to

series: data.rows

and the chart is created with "data" values from each object from "rows" array. How can I change the data source from objects "data" array to some other (e.g. "weight")?

Iliana Dyankova
Telerik team
 answered on 04 Apr 2013
4 answers
103 views
Greetings,

I'm having a couple issues with my Surface Pro and the Q1 release code.

1.  Dropdown lists are not functional via touch.  I tap the control and nothing happens.  However, they are functional when using the mouse.

The following demo page is a working example.  The "Select element" highlights when I tap it, but no options appear.  However, I see the dropdown options when using the mouse on my type cover.
http://demos.kendoui.com/mobile/forms/index.html#/

On the other hand, this site's dropdown <select> is fully functional (it works via the mouse AND via touch).
http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select

2. ListView items are not functional via touch.  Buttons work correctly but the ListView items do not cause the view to transition.

Here's a working example:
http://demos.kendoui.com/mobile/application/index.html#/

On my Surface Pro, tapping on "Play Music" does not cause the page to transition to the next view.  However, it works correctly when using the mouse.

Have you guys experienced this?  If so, what's the workaround?

Everything else I've seen with the Q1 code looks great.  Thanks.
Petyo
Telerik team
 answered on 04 Apr 2013
7 answers
1.3K+ views
This is driving me nuts. I am trying to do something that should be a no-brainer, but having loads of issues. I have two boolean fields that I want to bind to a combo box with Yes and No in it. I want to use the Kendo UI Combobox and I am doing all this in a popup template for a Kendo UI grid.In the code snippet bellow I have two selects (at the end of the template), one with the data-role="dropdownlist" set, the other without.The first select, ReceiveEmailMontlyFlyer, will select the correct value when you edit a user, but will not change the value it's supposed to be bound to. The second select, ReceiveEmailMessages, will not select the correct value or return the correct value.Please help. I must be missing something painfully simple, some rule about HTML 5 binding or Kendo that I don't know or understand.

<script id="popupEditorTemplate" type="text/x-kendo-template">
    <div class="k-edit-label">
        <label for="Username" class="required">Username</label>
    </div>
    <input type="text" class="k-input k-textbox" name="Username" data-bind="value:Username">
 
    <div class="k-edit-label">
        <label for="FirstName" class="required">First Name</label>
    </div>
    <input type="text" class="k-input k-textbox" name="FirstName" data-bind="value:FirstName">
 
    <div class="k-edit-label">
        <label for="LastName" class="required">Last Name</label>
    </div>
    <input type="text" class="k-input k-textbox" name="LastName" data-bind="value:LastName">
 
    <div class="k-edit-label">
        <label for="Email" class="required">Email</label>
    </div>
    <input type="text" class="k-input k-textbox" name="Email" data-bind="value:Email">
 
    <div class="k-edit-label">
        <label for="HomePhone">Home Phone</label>
    </div>
    <input type="text" class="k-input k-textbox" name="HomePhone" data-bind="value:HomePhone">
 
    <div class="k-edit-label">
        <label for="WorkPhone">Work Phone</label>
    </div>
    <input type="text" class="k-input k-textbox" name="WorkPhone" data-bind="value:WorkPhone">
 
    <div class="k-edit-label">
        <label for="MobilePhone">Mobile Phone</label>
    </div>
    <input type="text" class="k-input k-textbox" name="MobilePhone" data-bind="value:MobilePhone">
 
    <div class="k-edit-label">
        <label for="Line1" class="required">Address Line 1</label>
    </div>
    <input type="text" class="k-input k-textbox" name="Line1" data-bind="value:Line1">
 
    <div class="k-edit-label">
        <label for="Line2">Address Line 2</label>
    </div>
    <input type="text" class="k-input k-textbox" name="Line2" data-bind="value:Line2">
 
    <div class="k-edit-label">
        <label for="ReceiveEmailMontlyFlyer">Receive Flyer</label>
    </div>
 
    <select name="ReceiveEmailMontlyFlyer" id="ReceiveEmailMontlyFlyer" data-bind="value:ReceiveEmailMontlyFlyer">
        <option value="1">Yes</option>
        <option value="0">No</option>
    </select>
 
    <div class="k-edit-label">
        <label for="ReceiveEmailMessages">Receive other</label>
    </div>
    <select id="ReceiveEmailMessages" name="ReceiveEmailMessages" data-bind="value:ReceiveEmailMessages" data-role="dropdownlist">
        <option value="1">Yes</option>
        <option value="0">No</option>
    </select>
    <br />
</script>
Tyrel
Top achievements
Rank 1
 answered on 03 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?