Telerik Forums
Kendo UI for jQuery Forum
1 answer
123 views
If this is my template defined in my script
var coreTemplate: "<div id='favouritesTooltipContent'>\
                   <h2>Favourites</h2>\
                   <ul data-bind='source: items' data-template=''>\
                   </ul>\
                </div>",
...is there a way that the "data-template" for that URL could also live in the script instead of in the page??
Alexander Valchev
Telerik team
 answered on 26 Sep 2013
27 answers
392 views
Once we updated to latest release our endless scrolling list
views stopped working. We can see the datasource has the correct data but no
items are rendered in the list itself except for the loading element.

We managed to find that
it is all because of the “endlessScroll : true” option – if we comment it we see all
the data rendered. Code:

 

       var dsOpts = {

                     pageSize
: FDData.connection.pageSize,

                     serverPaging
: true,

                     transport
: {

                           read
: {

                                  url
: hostPrefix + "getTrans",

                                  dataType
: "json"

                           },

                           parameterMap
: function(options)

                           {

                                  var parameters = {

                                         session
: FDData.connection.sessionID,

                                         selector
: FDData.mainWalletID,

                                         pageSize
: FDData.connection.pageSize,

                                         nextToken :
FDData.connection.transNextToken,

                                         sortBy
: FDData.connection.sortBy

                                  };

 

                                  return parameters;

                           }

                     },

                     schema
: {

                           data
: function(response)

                           {

                                  if (!response.success)

                                  {

                                         showError("error: " +
response.errorMessage);

                                         return [];

                                  }

                                  FDData.connection.transNextToken
= response.nextToken;

 

                                  console.log("showWallet
connection : " + FDData.connection);

                                  return
response.transactions;

                           }

                     },

                     change
: function(e)

                     {

                            console.log("wallet data
update : ");

                           console.log(e);

                                 

                          

                           for ( var i = 0; i <
e.items.length; i++)

                           {

                                  var t = e.items[i];

                                  if
(FDData.connection.sortBy === "TransValueDate")

                                  {

                                         t.SortByDate
= t.TransValueDate;

                                  }

                                  else

                                  {

                                         t.SortByDate
= t.TransDate;

                                  }

                                  t.CategoryDescription
= getCategoryDesc(t.Category);

                                  FDData.walletData.push(t);

                           }

                     }

              };
//
dsOpts

 

              FDData.walletData
= [];

              FDData.walletDS
= new
kendo.data.DataSource(dsOpts);

 

              $("#wallet-container").kendoMobileListView({

                     dataSource
: FDData.walletDS,

                     template
: $("#tranTemplate").text(),

                     endlessScroll
: true,

                     scrollTreshold
: 30 //treshold
in pixels

              });

An image with some console readings is attached to show some more details.


If we go back to last quarter's sources - everything works just fine. 
Petyo
Telerik team
 answered on 26 Sep 2013
1 answer
124 views
Hello,

currently i am building an inbox with your listview control. i am trying to select multiple items in the view and manipulate them on a page refresh. (delete for example)
i experimented with a buttongroup in the listview item but i'm unable to get the current item when the button group is selected to fire the delete function

can you suggest some best practice to select multiple items in the listview and manipulate the items ?

i attached a screenshot to clarify what i mean

best regards
Petyo
Telerik team
 answered on 26 Sep 2013
1 answer
121 views
I am looking for some examples to limit to set the calendar on the scheduler to a certain month.

For example: I want the user to only go back till March, 2013 and not before that.
Also, Is there a way to restrict him to only view and not edit the events?

I am planning to use only the month view

Rosen
Telerik team
 answered on 26 Sep 2013
11 answers
603 views
There seems to be bug on Grid when using custom command. I am looking into the following example:
http://demos.kendoui.com/web/grid/custom-command.html 

But, when I specify the text for the command button ("Details") to "New Task", it won't work.
Further digging shows me that the text can't contain space. The text is somehow appended to class attribute of that element, causing jquery selector not working on that element.
Raymond
Top achievements
Rank 1
 answered on 26 Sep 2013
1 answer
148 views
Hello,
I'm trying to cut down on my JS files and use only the Kendo elements I need, but I'm running into some errors. 

This works fine:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" ></script>
<script src="JS/kendo/kendo.all.min.js"></script>
However this does not:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" ></script>
<script src="JS/Kendo/kendo.combobox.min.js"></script>
When running my code with the second code block, I get the error: Uncaught TypeError: Cannot read property 'jQuery' of undefined, which is caused by the variable 'window.kendo.jquery' not being set. 

Is there something else that I need to include with the individual components to get them to work? I can use kendo.web.min.js as a workaround for the time being, but I'd like to only use the components individually if possible.

Thanks!
Ryan
Ryan
Top achievements
Rank 1
 answered on 26 Sep 2013
2 answers
296 views
I try to change the theme dynamically.

I change the kendo.dataviz.(theme).min.css in the page
then I call this
var kendoElem = $elem.data('kendoRadialGauge');
kendoElem.setOptions({ theme: 'moonlight'});
kendoElem.redraw();

The gauge redraw  but the color of the pin and text graduation do not change.

Any suggestion?
Pierre
Top achievements
Rank 2
Iron
Iron
 answered on 25 Sep 2013
1 answer
253 views
Hi,
I am using three vertical splitters in my web application. The left pane has treeview and I have given the minimum width to this pane, but when I expand all the treeview nodes and if width of left pane splitter is less than the treeview container's width then vertical scrollbar of treeview container disappears.

Please let me know how can manage the treeview container's width with vertical scrollbar when I resize the splitter.

Thank you & Regards,

Poonam
Dimo
Telerik team
 answered on 25 Sep 2013
1 answer
220 views
I have a scenario similar to something which is featured in the Airlines Sample App on the My Trips page and I'm wondering what the best practices are for passing data into a View and modifying its content and title accordingly.

Basically, I will have a View which features a list of items. When a user click on of these items, he should get sent to a different view where certain fields and the view title are set to the information relevant to the selected item.

In the Airlines Sample App it works as follows :
  • The list of items are all links to the "details" view
  • There is a click event handler attached to each item in the list
  • When an item is clicked :
  1. The event handler fires and a global variable gets set to the information relevant to clicked item
  2. The href attribute points to the "details" view
  • The "details" view's "pageshow" event** is triggered, which fetches information in previously set global variable and sets the "details" view's content appropriately.

I do not like the use of a global variable to passe information between views... It seems to me there should be some sort of app.navigate(myVew, myData); method which passes myData along to the view's beforeShow and show event handlers or sets the view's viewModel.

The one method I've found which ressembles something I'd find acceptable involves doing the following in a click event handler :
app.navigate("#details?City=Magog&Country=Canada&...");
Unfortunately, the passed data is only available in the view's "show" event, not in "beforeShow" event - ideally I'd like to populate the view during the beforeShow, to ensure the user doesn't see the values flash when the page loads.

I'm faced with a similar situation when trying to change the "details" view's title. The title should appear in the NavBar header which is part of the default Layout. I can't seem to change the title in the beforeShow event, only in the show event. I believe this is because the Layout (and therefore the NavBar with the title) is moved into the view after the beforeShow event and before the show event. Again, I'd like to ensure the user doesn't see the view's title flicker when the page loads.



What are the best practices for these situations?
It seems like passing data to a view would be a fairly common occurrence, yet I couldn't find anything in the official documentation.


** The pageshow event is not documented anywhere I could find. I assume it was replaced by the "beforeShow" and "show" events?
Petyo
Telerik team
 answered on 25 Sep 2013
1 answer
42 views
Hi,

Below are the steps to reproduce it.

sample markup in the editor
<p class="test">hello</p>

when i hit "ENTER" at the end of the paragraph then editor will create a new paragraph as below
<p class="test"></p>

Ideal scenario would have been new paragraph without any class.

How to prevent it from carrying the same style?

Attached video recording to illustrate the scenario.

Environment:
All major browsers
Kendo service pack - Q2 2013 SP1(2013.2.918)

Looking forward to the positive reply.

Thanks,
Anthony
Alexander Popov
Telerik team
 answered on 25 Sep 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
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?