Telerik Forums
Kendo UI for jQuery Forum
1 answer
110 views
Our page contains complex "Widgets" and each widget might have multiple views, and we're using MVVM for the data.

I'm wondering (and I've seen posts eluding to this) if I can scrap the url routing portion and just be able to define views for each widget?...I'm concerned with the routes in the url and multiple widgets all getting confused and\or creating a terrible url.  Really nobody would be going "back", bookmarking, or linking anyway.

If this is possible, is there a demo\sample anywhere?

Steve
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 25 Jun 2013
1 answer
114 views
I am trying to edit the grid height with a bit of jquery and binding.
It does not appear to work.
I can do the colours and the font, but the height does not want to budge.
Below is my test on fiddle.
http://fiddle.jshell.net/zawisza/2k4hX/3/

Anyone know how to fix that?
Iliana Dyankova
Telerik team
 answered on 25 Jun 2013
1 answer
681 views
In my grids I have partials views as my editor templates. In the these editor templates I try to check the values on create and edit using razor if statements. These statements do not seem to work for grid editor templates. Here is an example
@if(Model.UserName!=null)
{
@Html.LabelFor(m=>m.Username)
}
else
{
@Html.TextBoxFor(m=>m.UserName)
}

The if always seems to fail is this because after the template is rendered these statements are no longer there and cannot be reached?

Is the only way to accomplish my task is by altering these elements via jquery in the grid edit event?
Alexander Valchev
Telerik team
 answered on 25 Jun 2013
1 answer
289 views
I am trying to change the "save" icon on my edit form when an item is flagged dirty as a visual reminder to the user to save her/his work. However it does not appear as though the "dirty" attribute of the Model object is observable. Its value never changes in the UI when I bind to it nor does it ever notify when I bind to the "change" event.

I know that I can do what I want by binding to "change" but it seems silly to have to observe the entire object and have an event that fires with every change and for any change when a property already exists that purports to contain the desired information that I am after.

Or am I just missing something?

http://jsfiddle.net/RobertKaucher/Fyrs6/
Daniel
Telerik team
 answered on 25 Jun 2013
1 answer
238 views
a long time ago we modified the kendostore front sample for our internal needs.

specifically store-browse.js

(function ($, kendo, store) {
    var viewModel = kendo.observable({
        Products: {
            data: [],
            total: 0
        },

noticed data is array not DataSource or ObservableArray
 - changing to DataSource throws a recursion error in kendo js file
 - ObservableArray works but suffers from duplicate rendering issue


About: kendo duplicate rendering issue

<section>
    <div class="clearfix" data-role="listView" data-bind="source: Products.data" data-template="product-template"></div>
</section>

attached is image where left side is code causes duplicate rendering randomly.

my hack so i wouldn't have to do major refactoring is on the right . (working - no more doubles)


Can someone explain why doubles happen when pushing into array (left side of code)?
Alexander Valchev
Telerik team
 answered on 25 Jun 2013
1 answer
81 views

Is there any way to set an even on click of a plotband? It would be nice if there was also a way to add a class or an id to the data elements so that you could use a jquery selector to get at any informat you are after. That would be a nice way to easily get at the elements. 
Iliana Dyankova
Telerik team
 answered on 25 Jun 2013
1 answer
11.7K+ views
Hi,
I've a menu like this
@(Html.Kendo().Menu()
      .Name("grouplist")
      .HtmlAttributes(new { style = "width: 140px;" })
      .Items(items =>
      {
            foreach (ns.Models.GroupModel item in groups)
            {
                items.Add()
                    .Text(item.Name)
                    .HtmlAttributes(new { @class = "menuitem" })
                    //.HtmlAttributes(new { @title = "Items in this group : " + item.Count })
                    .Items(children =>
                    {
                        children.Add().Text("Add new item");
                        children.Add().Text("Edit group");
                        children.Add().Text("Delete group!");
                    });
            }
        })
      .Orientation(MenuOrientation.Vertical))
All works fine if I keep commented the second HtmlAttributes (used to set the tooltip through title), if I uncomment that line, the menu show the tooltip but, uses jquery default style (and not kendo theme) and lost item css class 'menuitem'
Iliana Dyankova
Telerik team
 answered on 25 Jun 2013
1 answer
5.1K+ views
I'm trying on document.ready to call:
$("#ID_Comercial").addClass('mandatory');
But it doesn't works, the class gets added to an input shown below, but not to the actual dropdownlist, so it's not displaying the new styles :
<input id="ID_Comercial" class="mandatory" type="text" style="width: 200px; display: none;" name="ID_Comercial" data-role="dropdownlist">
How can I add a css class or remove it from an existing dropdownlist or any other kendo widget?

Thanks in advance.
Sergi
Top achievements
Rank 1
 answered on 25 Jun 2013
3 answers
772 views
I'm using the Kendo UI Web v2012.1.515 version and had a need to expand the first item in a dynamically created PanelBar (in code behind via c#). To make it more complicated, I'm working in SharePoint 2010. After sniffing around the DOM for a bit, I found a class on the first item in the panel "k-first". Since accessing the PanelBar.expand() method requires a jQuery selector, I decided to use this class as my selector...
here's the code snippet...

//pass the PanelBar into a JavaScript Object...
var ScorecardList = $("ul[jqID|='ScorecardList']=").kendoPanelBar({ });

//Show the first Item in the DisplyOrder Option List...via the k-first class...
var FirstExpand = ScorecardList.data("kendoPanelBar").expand($(".k-first"));

Disclaimer...this worked for me. This might not work in future releases, and may not work as described here. Your mileage may vary.
Alexander Valchev
Telerik team
 answered on 25 Jun 2013
1 answer
71 views
Hi,

I've just updated my version of Kendo UI to the latest commercial version.

I'm using the same application pattern as used in the Kendo Mobile Music Store (require.js, one js file per view).
I'm not sure if this has changed, but the initialisation of Application.pane now seems to occur after startup:-
$(function(){
    that.element = $(element ? element : document.body);
    that._setupPlatform();
    that._setupElementClass();
    that._attachHideBarHandlers();
    that.pane = new Pane(that.element, that.options);
    that._attachMeta();
 
    if (that.options.updateDocumentTitle) {
        that._setupDocumentTitle();
    }
 
    that._startHistory();
});
That means that anything that uses Application.pane (utils.redirect, utils.showLoading) on a "show" call from my initial view crashes thus:-

Uncaught TypeError: Cannot read property 'history' of undefined scripts/utils.js:54
  redirect  scripts/utils.js:54
Please let me know if you can help, or if I can provide further information.

Matt
Petyo
Telerik team
 answered on 25 Jun 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)
SPA
Filter
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
OrgChart
TextBox
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
Popover
DockManager
FloatingActionButton
TaskBoard
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
TimePicker
DateTimePicker
RadialGauge
ArcGauge
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?