Telerik Forums
Kendo UI for jQuery Forum
1 answer
302 views

Is it possible to specify the text alignment property per tabstrip.
I've looked through the documentation but cannot find anything.

I can cange the alignment by doing the following but that makes it so for the whole site.

<style>
.k-tabstrip .k-tabstrip-items { padding:0.3em 0.35em 0;}
.k-reset { text-align:right;}
</style>

Any help would be greatly appreciated.
John
Top achievements
Rank 1
 answered on 23 Jan 2013
2 answers
117 views

We have recently downloaded a trial version of the Kendo UI suite with a view to making a purchase at the end of the trial. We are using the Kendo grid control in Ajax binding mode and have noticed a few problems. The main issue is that the following script error occurs when deleting the last record in the model that is bound to the grid:

Unhandled exception at line 18, column 31059 in http://**/Scripts/kendo/2012.3.1114/kendo.web.js 0x800a138f - Microsoft JScript runtime error: '_current' is null or not an object

We cannot replicate this in Chrome. We are interested in Kendo as it is marketed as being compatible with IE8. This doesn't appear to be the case.

Here is the grid in our .cshtml file:

@(Html.Kendo().Grid(Model)
    .Name("UserGrid")
    .HtmlAttributes(new { style = "height:500px" })
    .Columns(columns =>
    {
        columns.Bound(p => p.ReferenceNumber).Groupable(false);
        columns.Bound(p => p.Title).Title("Title");
        columns.Bound(p => p.AgreementDate).Title("Agreement Date");
        columns.Bound(p => p.Superseded).ClientTemplate(
        "<input type='checkbox' disabled='disabled' value='#= Superseded #' " +
            "# if (Superseded) { #" +
                "checked='checked'" +
            "# } #" +
        "/>");

        //columns.Bound(p => p.Parties.Count);
        columns.Bound(p => p.SourceDocumentLink);
        columns.Bound(p => p.RelationshipLeadDirector);
        columns.Bound(p => p.Owner);
        columns.Bound(p => p.LegalContact);
        columns.Command(command => command.Destroy()).Width(100);
        columns.Template(@<text></text>).ClientTemplate("<a class='k-button k-button-icontext k-edit-button' href='" + Url.Action("Update", "Agreement") + "/#=Id#'><span class='k-icon k-edit'></span>Edit</a>");        
    })
    .DataSource(dataSource => dataSource
        .Ajax()
        //.Server()
        //.Events(events => events.RequestStart("requeststart_handler"))
        //.Events(events => events.Error("error_handler"))              
        .Model(model => model.Id(p => p.Id))
        .Destroy("Delete", "Agreement")
        .Update("Update","Agreement")        
        .Read(read => read.Action("ListAgreements", "Agreement")
        ))
    .Navigatable()
    .Scrollable()
    .Resizable(s=>s.Columns(true))
    .Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
    .Sortable()
    .Pageable(builder => builder.PageSizes(true))
      )

And here is the action on our controller that takes care of a delete:

[HttpAjaxPost]
public JsonResult Delete([DataSourceRequest] DataSourceRequest request, AgreementData agreement)
{
    try
    {
        _agreementService.DeleteAgreement(agreement);
        ModelState.Clear();
    }
    catch (Exception ex)
    {
        Logger.GetLog(Logger.ServiceLog).Error(ex);
        ModelState.AddModelError("errors", "Delete failed");
    }
    return Json(ModelState.ToDataSourceResult());
}

Is this a bug with the Kendo grid or have we missed something obvious? Just to recap..the script error only occurs when deleting the last record in the grid.

Sebastian
Telerik team
 answered on 23 Jan 2013
3 answers
91 views
With a Kendo UI Grid component I am doing the following to get 'titles' on my cells:

    var myGrid = $("#myGrid").kendoGrid({
         ...,
        dataBound: function(e) {
            // Set the title for all of the cells
            $("#myGrid td").each(function() {
                $(this).attr('title', $(this).text());
            });
         }
    }).data("kendoGrid");

But I have multiple grids spread throughout my app on multiple pages. I don't want to copy/paste this code everywhere.

How would I go about extending the kendoGrid, so that all kendoGrid components will inherit this functionality?
I have purchased Kendo UI and do have the source code, but I would prefer not to make direct changes, so that I can update easier at later dates.
Nikolay Rusev
Telerik team
 answered on 23 Jan 2013
1 answer
183 views
Hi Guys, 
I'm having some trouble trying to parse a deserialized date for a template...

my date after being deserialized seems like: /Date(1309471200000+0200)/
if I use that kind of date as a member of a kendo grid (using { type: "date" } and template: '#= kendo.toString(myDate,"dd/MM/yyyy") #') everything works great...

now I defined (inside a script tag in an .ashx page) a template for a listView object, and it is something like:

......
......
<div>
        <span>${kendo.toString(myDate, "dd/MM/yyyy")}</span>
        <span>${kendo.toString(MyNumber, "c02")}</span>
    </div>

......


myNumber gets correctly formatted...
while myDate remains like /Date(1309471200000+0200)/
I've already tried kendo.format("{0:d}, myDate") with no result, and the culture is correctly set to italian.


Thanks in advance!
Fabio



Gaetano
Top achievements
Rank 1
 answered on 23 Jan 2013
3 answers
123 views
Is it possible to virtualize the scrolling in a DropDownList? 

Thanks!

Matt
Georgi Krustev
Telerik team
 answered on 23 Jan 2013
1 answer
156 views
When the menu appears it is covering up the button I clicked on to show it. Is there a way to fix this? Maybe by specifying an offset-y or top margin?
Kamen Bundev
Telerik team
 answered on 23 Jan 2013
3 answers
108 views
Hi,

how can I change li background-color on item click to visualize that user has selected a row?
here is what i have:

...
                <ul id="lvDatabases">
        </ul> 
...

    <script type="text/x-kendo-tmpl" id="tmplDatabase">
<label >
<img style="float:left; padding-right: 0.5em" src="images/bullet.png" alt="bullet" />
${name}
</label>
    </script> 

       $("#lvDatabases").kendoMobileListView({
           dataSource: _dsDatabases,
           template: kendo.template($("#tmplDatabase").html()),
           style: "inset"
       });

Kind regards
Axel
axel
Top achievements
Rank 1
 answered on 23 Jan 2013
1 answer
206 views
Hi,
I'm trying to do a login page starting from you demo sample.
The client side validation is not working, it runs only server side causing a tedious postback.
I simply copied your code demo.
Am I missing something?

This is my code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Namespace.Login" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Login</title>
    <link href="Content/Styles/login.css" rel="stylesheet" />
</head>
<body>
    <form id="formLogin" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <div id="rfd-demo-zone">
            <div class="vlaidationSummary">
                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
                    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" DecorationZoneID="rfd-demo-zone" />
                    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"></telerik:RadAjaxLoadingPanel>
 
                    <div class="groupWrapper">
                        <asp:Login ID="Login1" runat="server" Width="100%" EnableViewState="false" OnLoggingIn="Login1_LoggingIn">
                            <LayoutTemplate>
                                <table cellpadding="1" cellspacing="0" width="100%">
                                    <tr>
                                        <td>
                                            <table cellpadding="0" width="100%">
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Username:</asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                                            ErrorMessage="Required" ToolTip="Required" ValidationGroup="Login1"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
 
                                                <tr>
                                                    <td>
                                                        <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="Password" runat="server" TextMode="Password" Text="caffe"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                                            ErrorMessage="Required" ToolTip="Required" ValidationGroup="Login1"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
 
                                                <tr>
                                                    <td> 
                                                    </td>
                                                    <td>
                                                        <asp:CheckBox ID="RememberMe" runat="server" Text="Remember"></asp:CheckBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="center" colspan="2" style="color: Red;">
                                                        <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2" style="text-align: right;">
                                                        <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Log In" ValidationGroup="Login1"></asp:Button>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </LayoutTemplate>
                        </asp:Login>
                        <asp:Label ID="lblRisultato" Text="" Font-Size="Large" ForeColor="Green" runat="server"></asp:Label>
                        <div style="margin-top: 5px;">
                            <asp:LoginName ID="LoginName1" runat="server" Width="300px" EnableViewState="false"></asp:LoginName>
                        </div>
                        <div style="margin-top: 5px;">
                            <asp:LoginStatus ID="LoginStatus1" runat="server" Width="300px" EnableViewState="false"></asp:LoginStatus>
                        </div>
                        <div style="margin-top: 5px;">
                            <asp:LoginView ID="LoginView1" runat="server" EnableViewState="false">
                                <AnonymousTemplate>
                                    <div style="height: 100px">
                                        This is displayed if the user is NOT logged in!
                                    </div>
                                </AnonymousTemplate>
                                <LoggedInTemplate>
                                    <div style="color: #fff; background-color: #015914; -moz-border-radius: 4px; padding: 4px;">
                                        This is displayed if the user is LOGGED in!
                                    </div>
                                </LoggedInTemplate>
                            </asp:LoginView>
                        </div>
                    </div>
 
                </telerik:RadAjaxPanel>
            </div>
        </div>
    </form>
 
</body>
</html>
The code behind is empty.

Any suggestion will be grateful!
Thank you so much ;)
Danail Vasilev
Telerik team
 answered on 23 Jan 2013
3 answers
325 views
Hi, 
When I used select event in editor widget, it work in IE<=8, but not work in 9 and 10,  When I debuging, js code throw exception saying that "Object doesn't support property or method 'getSelection'",  some times, saying method "replace" and key-down event also happen this error in IE10, the js code file is "kendo.all.min.js" and "kendo.web.min.js", is it not supported in IE9 and IE10?
thx
Jason
Top achievements
Rank 1
 answered on 23 Jan 2013
1 answer
224 views
I am trying out the file upload as given in the http://demos.kendoui.com/web/upload/async.html - While trying out the asynchronous file upload, I used the HTML as given in the demo, but it gives the 404 error
I replaced the "save" with http://localhost:9876/api/upload/savefile - which is a controller I developed and is hosted on standalone HTTP service (doesn't use MVC) based on the code given in the demo.
Can you tell me if I can use the Kendo UI with ApiController (instead of the Mvc.Controller as shown in the example) 
-Bhanu
Daniel
Telerik team
 answered on 23 Jan 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
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
DropDownTree
ListBox
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
Styling
ColorPicker
Pager
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
Licensing
PivotGridV2
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
LLM Kit
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?