Telerik Forums
Kendo UI for jQuery Forum
11 answers
1.3K+ views
This applies to both ComboBox and DropdownList. When the input's width is set using % to be fluid, the dropdown itself does not stay in sync once the page is rendered and then the containing size changed. In other words, the dropdown width never updates once initially rendered.

I do not believe I am overlooking anything. It also doesn't seem to matter if setting width via CSS or adding style directly to input element. See this basic demo as a test. Resize the window (bigger or smaller) to see the dropdown list width remain static. Note, I only tested this in Chrome: http://jsfiddle.net/4uCHx/5/ 

Thanks,
Mike
Michael
Top achievements
Rank 1
 answered on 05 May 2012
5 answers
93 views
We have setup our application to be able to use the add home screen option in the iPhone. Once we do that the app stops behaving normally. We tried setting the initialload option when the framework is loaded, but it is completely ignored. We ended up having to do a  window.location.replace to the screen we wanted. What is causing the iPhone to act differently between Safari and running it as a fake native app?
Petyo
Telerik team
 answered on 05 May 2012
0 answers
107 views
Hi ,

I have a function to call in a listView which is generated using a template. The function takes id of the div and does something to it. The cannot be same of all div(s) generated in the listView or else the function logic will for a toss. I tried generating the id of div like this :

<div id="menuitemtarget#= eventId #" ..... 
But to my dismay, the id does not take in menuitemtarget101 (if eventId is 101) it takes it as id="menuitemtarget#= eventId #" as it is.


My Code is somewhat like this :


<div id="menuitemtarget" class="searchcell"

onclick="# tntToggleMenu("#menuitemtarget", "#menuActions") #>

<span>Actions</span> <span class="iconaero"> <!-- -->

</span>

<div class="clear"></div>

<ul class="actionsMenu displayNone" style="margin: 0;"

id="menuActions">

<li class="actionMenuItem"><a href="">Option 1</a> </li>

<li class="actionMenuItem"><a href="">Option 2</a> </li>

</ul>

</div>





Please help

Muhammed Shakir
Top achievements
Rank 2
 asked on 05 May 2012
4 answers
339 views
Hello,

I have some values being returned from a remote data source and would like them to be formatted as currency.  So currently I have something like:

<span data-bind="value: amount"></span>

And it's outputting something like 59.9 and I would like it to output $59.90.

Is there a recommended way to accomplish this without hard-coding the $ and changing the data type to a string?

  Nick
Vladimir
Top achievements
Rank 1
 answered on 05 May 2012
1 answer
191 views
I need to put a div in the center of view, but the div (km-scroll-container) does not allow for not having the height: 100%
How do Kendo UI does not create this div? 
Rudá Cunha
Top achievements
Rank 2
 answered on 04 May 2012
0 answers
123 views
Every time I execute a javascript function like clean form or ajax post, browser automatically reload page. I test to use alert function with return false, it's worked but with form don't.

I discovered what happened, I error in javascript makes page reload!
Claudio
Top achievements
Rank 1
 asked on 04 May 2012
0 answers
98 views
Is there a way to cancel the selection of a row?
I have an editor that shows the details of the selected row. I want to be able to prevent the user from changing the selection if the editor has unsaved changes.
Is there a way of preventing this?

Cheers,
Andrés
Andrés
Top achievements
Rank 1
 asked on 04 May 2012
2 answers
111 views
Apologies if this has been answered elsewhere... I couldn't find it. 

When configuring the validation settings in a datasouce model, is there a way to specify a different label for the field name that is displayed in the validation message.

I don't really want custom validation messages, just something like: Reference is a required field, rather than ref_number is a required field

Thanks
Mat
Top achievements
Rank 1
 answered on 04 May 2012
1 answer
434 views
I have a clone function (shown below) for deep copying of objects. How could I clone a datasource object (like the one below) and then change the url and then re-use it for multiple Grids?

dataSource = new kendo.data.DataSource({
    type:"json",
    transport:{
        read:{
            dataType:"json"
        }
    },
    schema:{
        data:"results",
        total:"count"
    },
    error:function (e) {
        alert("fetch types error happened: " + e);
    }
});

datasource2 = clone(datasource);
datasource2.transport.read.url = "http://anotherSite";  // will not work, but this is the idea

here is my clone function:

function clone(obj) {
    var copy;
    // Handle the 3 simple types, and null or undefined
    if (null == obj || "object" != typeof obj) {
        return obj;
    }
    // Handle Date
    if (obj instanceof Date) {
        copy = new Date();
        copy.setTime(obj.getTime());
        return copy;
    }
    // Handle Array
    if (obj instanceof Array) {
        copy = [];
        var i;
        var len = obj.length;
        for (i = 0; i < len; ++i) {
            copy[i] = clone(obj[i]);
        }
        return copy;
    }
    // Handle Object
    if (obj instanceof Object) {
        copy = {};
        for (var attr in obj) {
            if (obj.hasOwnProperty(attr)) copy[attr] = clone(obj[attr]);
        }
        return copy;
    }
    throw new Error("Unable to copy obj! Its type isn't supported.");
}

Dr.YSG
Top achievements
Rank 2
 answered on 04 May 2012
1 answer
157 views
I created a List that is populated from an external JSON file.

But I don't like cluttering my HTML with Javascript snippets, So I thought I could just reference an external file. But that is not working:

Original: (which works)

<div id="listView">
    <script src="Templates/TypeEntryTemplate.tmpl" type="text/x-kendo-tmpl" id="template" >
        <div class="typeEntry">
            <input id="typeCheck-${idx}" value="type-${type}" type="checkbox" checked="checked"/>
            <label for="typeCheck-${idx}">${type}</label>
        </div>
    </script>
</div>

Moving the script to an external file:

<div id="listView">
    <script src="Templates/TypeEntryTemplate.tmpl" type="text/x-kendo-tmpl" id="template" />
</div>

External File (Templates/TypeEntryTemplate.tmpl :

<div class="typeEntry">
    <input id="typeCheck-${idx}" value="type-${type}" type="checkbox" checked="checked"/>
    <label for="typeCheck-${idx}">${type}</label>
</div>


FYI: here is the code that creates the ListView:

$("#listView").kendoListView({
    dataSource:dataSource,
    pageable:false,
    template:kendo.template($("#template").html())
});

Dr.YSG
Top achievements
Rank 2
 answered on 04 May 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
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
Dialog
Chat
DateRangePicker
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
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
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?