Telerik Forums
Kendo UI for jQuery Forum
1 answer
117 views
I am using a kendo grid with an Generic Handler ashx .net handler in the back end. Everything works fine in Chrome/FF.

In IE10, I can make changes to the data, and everything appears to work. But if I navigate away form the page, and then back, I see the old data before my edits. Clicking the refresh button then shows the correct data with the new value I put in. No errors show up in the console.existingTasks

 This is 100% reproducible: launch example, to to tasks.aspx. Change data and save. Click home link. Click tasks link, and see that stale data is there. Click refresh, and see the data you previously entered.

I have tried putting IE10 in compat. mode, that that makes it so that the entire grid does not even render.
Shea
Top achievements
Rank 1
 answered on 22 Apr 2013
2 answers
60 views
I have a grid with a mode. I have defined the required field in the model as such:
WorkTypeID: { type: "number", validation: { required: true } },
If don't set a value for the at field, I am still able to save. Is there a way I can prevent the user from saving without choosing a value for this field?
Shea
Top achievements
Rank 1
 answered on 22 Apr 2013
4 answers
62 views
Hi, I'm wondering if there is a fix for a bug that I found. I looked but I wasn't able to find mention of in other threads.

To reproduce:
  1. Type anything into a blank editor
  2. Bold the first part
  3. Select all and delete
  4. Type anything
The bold button is off but all subsequent text is bold and I am unable to un-bold it.
Lee
Top achievements
Rank 1
 answered on 22 Apr 2013
4 answers
38 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
164 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
129 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
527 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
479 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
401 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
106 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
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
AICodingAssistant
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
+? 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?