Telerik Forums
Kendo UI for jQuery Forum
1 answer
176 views
I have a KendoUI Grid that has a detail template defined.  Is it possible to change the template on the fly?

I tried setting options.detailTemplate with a new template and also called refresh() but that didn't work.

Thanks,

victor
CsHARPMan
Top achievements
Rank 1
 answered on 24 Oct 2012
1 answer
308 views
I have a view with an input field that displays firstName.  I want to apply some business logic to firstName.  If the user violates the business logic, I want the view to display the "current" value for firstName.
.
Here is the view:
<div id="personFields">
    <div class="field">
        <div>First Name:</div><input data-bind="value: firstName" required />
    </div>
    <div class="field">
        <div>Last Name:</div><input data-bind="value: lastName"/>
    </div>
    <div class="field">
        <div>Full Name:</div><span data-bind="text: fullName"/>
    </div>
     
    <button data-bind="click: reset">Reset</button>
</div>

Here is the ViewModel:
var person = kendo.observable({
    firstName: "John",
    lastName: "DeVight",
    fullName: function() {
        return this.get("firstName") + " " + this.get("lastName");
    },
     
    reset: function() {
        this.set("firstName", "John");
        this.set("lastName", "DeVight");
    }
}).bind("set", function(e) {
    if (e.field == "firstName" && !e.value) {
        e.preventDefault();
    }
});
 
kendo.bind($('#personFields'), person);

When I change firstName to an empty value, the input field remains empty.

I tried changing the handler for the set event to this:
function(e) {
    if (e.field == "firstName" && !e.value) {
        var field = e.field;
        var currVal = this.get(e.field);
           this.set(field, currVal);
        e.preventDefault();
    }
}

But the input field still does not get reset to the "current" value.  How do I do this?

Regards,

John DeVight
John DeVight
Top achievements
Rank 1
 answered on 24 Oct 2012
1 answer
329 views
Hi,

I've generated a less file via the theme builder and as written there (http://docs.kendoui.com/getting-started/themebuilder), I,ve also added the template.less to my project. So right now I have the following files :

- mixins.less
- kendo.default.less
- common.less
- template.less
- and finally my custom.less generated via the theme builder.

When I launch my website, I've got this error message :

variable @widget-background-color is undefined

in template.less on line 106, column 23:

  • {
  •     background-color: @widget-background-color;
  • }
What am I missing ?

Thanks
Olivier
Top achievements
Rank 1
 answered on 24 Oct 2012
1 answer
214 views
Hi,

when I use the following layout for all my views I realized that the Back button appears on every view.

<section data-role="layout" data-id="default">
            <header data-role="header">
                <div data-role="navbar">
                    <a class="nav-button" data-align="left" data-role="backbutton">Back</a>
                    <span data-role="view-title"></span>
                </div>
            </header>
        </section>

As far as I remember "jQuery mobile" automatically hides the back button on the first view by default - which is great because I surely don't want a back button on my first view.

Having the back button even on the first view, is that by design in Kendo mobile?

Thx
Ingmar
softwarea
Top achievements
Rank 1
 answered on 24 Oct 2012
0 answers
230 views
I am trying to bind a DataSource to my DateTimePicker widget but I'm somewhat at a loss as to whether this actually works and how the data could be defined.  Currently I'm using the following code.

var timeSource = new kendo.data.DataSource({
    transport: {
        read: {
            url : "/cgi-bin/system.cgi?time",
            dataType : "json"
        }
    }
});
 
$("#datetimepicker").kendoDateTimePicker({
    dataSource: timeSource
});

And the server is returning json with the following format, I can change this part easily but I'm not sure what DateTimePicker is expecting.

[ { "time" : "Wed Oct 24 10:26:46 MDT 2012" } ]
Sébastien
Top achievements
Rank 1
 asked on 24 Oct 2012
1 answer
355 views
I am performing validation on missing data when loading the grid and applying a red border to a cell where the data is missing so the user can identify missing data quickly. I have my grid groupable = true so the user can group by column headers. My problem is I lose the cell border after the user drag/drops the column header into the "Drag a column header and drop it here to group by that column" area. Any ideas on what fires after the grouping is done or where I can insert a custom method to reapply my cell border. 
Vladimir Iliev
Telerik team
 answered on 24 Oct 2012
1 answer
164 views
how to set kendo.ui.ListView groupable like grid?
Frank
Top achievements
Rank 1
 answered on 24 Oct 2012
0 answers
153 views
Hi everyone!

I have this endless scrolling component but in my case I want to make every <li> clickable, so i designed this template:

...
<script id="endless-scrolling-template" type="text/x-kendo-template">
<a href="#overview-account">
<div id="parent">
   <div class="img-div">
<img src="../../content/mobile/overview/nairobi.jpg" />
</div>
<div class="name-div">random_string</div>
<div class="url-div">random_string</div>
<div class="dist-div">random_string</div>
</div>
</a>
</script>

But when the page is rendered nothing is displayed...


If I remove the <a tag like this:
...
<script id="endless-scrolling-template" type="text/x-kendo-template">
<div id="parent">
   <div class="img-div">
<img src="../../content/mobile/overview/nairobi.jpg" />
</div>
<div class="name-div">random_string</div>
<div class="url-div">random_string</div>
<div class="dist-div">random_string</div>
</div>

...everything is ok but the elements are not clickable :/

This is the exception:
Thank you all!

Uncaught Error: Invalid template:'<li data-uid="#=uid#"> <a href="#overview-account"> <div class="parent"> <div class="img-div"> <img src="../../content/mobile/overview/nairobi.jpg" /> </div> <div class="name-div">random_string
</div> <div class="url-div">random_string
</div> <div class="dist-div">random_string
</div> </div> </a> </li>' Generated code:'var o,e=kendo.htmlEncode;with(data){o='<li data-uid="'+(uid)+'">\n <a href="';overview-account"> <div class="parent"> <div class="img-div"> <img src="../../content/mobile/overview/nairobi.jpg" /> </div><div class="name-div">random_string
</div><div class="url-div">random_string
</div> <div class="dist-div">random_string
</div> </div> </a> </li>;o+=;}return o;'


David
Top achievements
Rank 1
 asked on 24 Oct 2012
1 answer
197 views
Hello,

for testing purposes i just try recreate a simple input mask from a former application in Kendo UI. Unfortunatly i couldn't find any ressources on how to layout and expand the editor pop window.

How can i realise this (ar at least similar) input mask in kendo ui popup editor?

And is there a image selector widget?

And last question. In my popup window template i alway get this js code in the headline. How can i avoid this?
function anonymous(data) { var o,e=kendo.htmlEncode;with(data){o='

Thanks in advance

Btw. The example is a real 'Kendo' page.
Kendo UI seems like real kendo, you need keiko, keiko, keiko ... :D
Iliana Dyankova
Telerik team
 answered on 24 Oct 2012
1 answer
1.3K+ views
Hi I am trying to

columns.Bound(f => f.Admin_Menu_Group.Name ).Title("Admin Menu Group");
or
columns.Bound(f => f.Admin_Menu_Group != null ? f.Admin_Menu_Group.Name : "").Title("Admin Menu Group");

But error "Bound columns require a field or property access expression"

Because Admin.Menu.Group field is null.
Petur Subev
Telerik team
 answered on 24 Oct 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
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
ColorPicker
Pager
Styling
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
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?