Telerik Forums
Kendo UI for jQuery Forum
4 answers
46 views
I was able to reproduce this even on the demo site.
For the editor clear out the existing content.
1. Type Line 1 then hit enter
2. Type Line 2 then hit enter
3. Put cursor at the start of Line 2
4. Drag up to the beginning of line 1
5. Hit delete.

The text "Line 2" is not .75em.
Looking at the source, originally the text is two paragraphs.  After deleting the line 2 text is a span with an inline style of font-size= .75em

Is there a way to not have this span tag add inline styling.
Lee
Top achievements
Rank 1
 answered on 22 Apr 2013
1 answer
176 views
Hi,

I have a value that I am reading from a database as a 1 or 0 that I want to display in a list view as YES or NO and when editing as a checkbox...

I succesfully set the template to show YES or NO by using this code:
<div>#if(sup==1){#YES#}else{#NO#}#</div>

but I can not get the edit_template to show checked when sup == 1... it always displays unchecked.
Can you help with the proper syntax to read this value for a checkbox in an edit_template?

Thank you,
Andrew
Alexander Valchev
Telerik team
 answered on 22 Apr 2013
1 answer
136 views
Hello,

I've created a scrollview with some pages. Inside the first page there's something like :
<p>A very very long text which cannot be in the screen, [...]</p>

But the text does not fit in the whole screen, it looks like this :
http://imageshack.us/a/img802/8108/image2hqt.png

If I disable the scrollview :
http://imageshack.us/a/img62/123/imagewpmc.png

Do you have any idea how I can wrap the content of a page to fit the screen ?

Thank you in advance,
Jérôme ALLAMAGNY
Top achievements
Rank 2
 answered on 22 Apr 2013
3 answers
546 views
Hello,

I am exploring building mvvm custom widgets. Although there is a clear example using a dataSource in the blogs, I want to bind my widget to an ObservableObject viewmodel.

My view model is simple:
var viewModel = kendo.observable({
    message: {type:"info", text: "Hello World!"}
});

My custom widget shall display an information box with an icon defined by the type (info, warning, error, success) and the text message like in the resulting code below (styles not included).
<div id="myMessageBox">
    <img src="./images/infoIcon.png" alt="Hello World!" /><span>Hello World!</span>
</div>

To achieve that, the body of my web page looks like this:
<body>
    <div id="myMessageBox" data-role="infobox" data-type="message.type" data-text="message.text"></div>
</body>

I have some script to bind the view model to the body:
kendo.bind($("body"), viewModel);

and I have implemented my custom widget as follows:
; (function ($, undefined) {
 
    "use strict";
 
    var kendo = window.kendo,
        ui = kendo.ui,
        Widget = ui.Widget;
 
    var InfoBox = Widget.extend({
 
        init: function (element, options) {
            var that = this;
            options = options || {};
            kendo.ui.Widget.fn.init.call(that, element, options);
            that._infoBox();
        },
 
        options: {
            name: "InfoBox",
            type: "info", //warning, error, success
            text: 'Default message for an information box',
            autoBind: true
        },
 
        type: function (value) {
            var that = this;
            if (value) {
                //check value is info, warning, error or success
                that.options.type = value;
                //that._refresh();
                return;
            }
            else {
                return that.options.type;
            }
        },
 
        text: function (value) {
            var that = this;
            if (value) {
                //check value is of type string
                that.options.text = value;
                //that._refresh();
                return;
            }
            else {
                return that.options.text;
            }
        },
 
        _infoBox: function () {
 
            var that = this;
            that._refresh();
        },
 
        _template: '<img src="{0}" alt="#:{1}#" /><span>#:{1}#</span>',
 
        _refresh: function() {
            var that = this;
            var template = kendo.template(kendo.format(that._template, that.options.infoIcon, that.options.text));
            //How can I find the viewModel the body is bound to??????
            //$(that.element).html(template(viewModel));
        }
    });
 
    ui.plugin(InfoBox);
 
})(jQuery);

The issue I am facing is how can I access the viewModel the body of the page is bound to from within my custom widget?
Jack
Top achievements
Rank 2
Iron
 answered on 22 Apr 2013
13 answers
494 views
Hi,

I have a problem with KendoUI Grid when I group and sort - items are not sorted properly. Here is a demo: http://jsfiddle.net/7Dbkz/1/ 

If I use IE everything works as expected, but it doesn't work in Chrome. I have been told there is an issue with Chrome when it comes to Array.sort implementation (http://code.google.com/p/v8/issues/detail?id=90). Is there a workaround for this issue? If there isn't a solution, grouping is useless in Chrome.

Thanks,

Igor
Nathan
Top achievements
Rank 2
 answered on 22 Apr 2013
1 answer
414 views
I am trying to avoid drag and droping on disabled elements . My tree view definition is:
@(Html.Kendo().TreeView()
        .Name("treeview")
        .DragAndDrop(true)
        .ExpandAll(true)
           .Events(e => e.Drag("...").DragStart("....").Drop("...").Select("..."))
....
 .BindTo(....
               item.Text = x.Name;
               item.Id = x.Id
               item.Enabled = false;
 )
Events do some business logic for elements movement. I was trying to find on DragStart event any information about k-state-disabled class in e.sourceNode but I fail. 
Also I was trying to found any Enabled property in data source element - also did not found anything.
Could someone help with this issue ? Where is my mistake?
Dimiter Madjarov
Telerik team
 answered on 22 Apr 2013
1 answer
123 views
Hi I'm trying to nest a window inside a treeview.  I want to open the window when "What Established This?" is clicked.  Right now the text is showing up but nothing happens when i click it.


@(Html.Kendo().TreeView()
              .Name("relations")
              .Items(treeview =>
                treeview.Add().Text("Established Relationships for "+ Model.Mrn).HtmlAttributes(new {style="font-weight:bold;"})
                    .Expanded(true)
                    .Items(root =>
                        {
                            foreach (var dep in Model.DepartmentsUser)
                            {
                                if (dep.IsEnabled)
                                {
                                    var dep1 = dep;
                                    root.Add().Text(dep.Name).Items(
                                        i =>
                                            {
                                                i.Add().Items(w=>Html.Kendo().Window()
                                                    .Name("window")
                                                    .Title("Establishing Encounters")
                                                    .Content("loading user info...")
                                                    .LoadContentFrom("Action", "Controller", new { mrn = Model.Mrn, deptId = 1 })
                                                    .Iframe(true)
                                                    .Draggable()
                                                    .Resizable()).Text("What Established This?").SpriteCssClasses("ques-grey");
                                                //i.Add().Url("#").Text("What Established This?").SpriteCssClasses("ques-grey");
                                                i.Add().Text("Divisions").Items(
                                                    di =>
                                                        {
                                                            foreach (var div in dep1.Divisions)
                                                            {
                                                                var div1 = div;
                                                                di.Add().Text(div.Name).Items(divi =>
                                                                    {
                                                                        divi.Add().Text("Description: " + div1.Description);
                                                                        divi.Add().Text("Enabled: " + div1.IsEnabled);
                                                                    }).SpriteCssClasses("div-grey");
                                                            }
                                                        }).Expanded(true);
 
                                            }).
                                SpriteCssClasses("dept-blue");}
                            }
                })).Events( e=>e.Change("removeSelectedCss"))
            )
Alex Gyoshev
Telerik team
 answered on 22 Apr 2013
3 answers
313 views
We've been working on protoyping an application and would like to allow the user to have maximum flexibility to hide/unhide columns and perhaps reorder columns.  I'm going to call this column manipulation.

We started out by using columnTemplates to format columns and column manipulation presented no issue.  

However, we also want to be able to mark the entire row of the grid (i.e. when the item the row represents becomes "used") by assigning the whole row a CSS class or style (e.g. "opacity:0.30"), so we switched to a row template so that we could create the <tr> element and set its class according to a data value.  We also created an alternate row template that differs only by adding the k-alt class.  Works well.

However, if we allow the column menu to manipulate the list of columns, the rowTemplate (coded to expect a particular list of columns in a certain order) has a bit of an issue.

Do you have a suggestion for how to handle the whole-row decoration without using a row Template, or how to write a rowTemplate that is aware of the column manipulation?

In a somewhat related vein, is there an easy way for a columnTemplate to know what column it has been summoned forth to format?  Say I want to use the same exact template for 2 (or more) columns.  However, the columnTemplate is passed the entire model, not just the column to be formatted.  No problem for a columnTemplate that only handles one column, but an issue for one that doesn't know which of the columns it should format data from.
Daniel
Telerik team
 answered on 22 Apr 2013
1 answer
107 views
Inside your GettingStarted section, the web editor page ends up in strange content...

See the page at http://docs.kendoui.com/getting-started/web/editor/overview

What’s going on for this editor related documentation page? I would like some content to appear, for me to ne known to the editor mechanismes...

Dimo
Telerik team
 answered on 22 Apr 2013
1 answer
163 views
Run attach solution, it generates an error.
If you remove the ValidateAntiForgeryToken from the TenantController.TenantList method it is successful.
Petur Subev
Telerik team
 answered on 22 Apr 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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
BulletChart
Licensing
QRCode
ResponsivePanel
TextArea
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?