Telerik Forums
Kendo UI for jQuery Forum
3 answers
118 views

Hello,

I have a ListView and template defined as follows:

<ul data-role="listview"
id="multiactivity-listview" 
data-bind="source: activityTypeDataSource"
data-template="multiactivity-template"
data-filterable="{field: 'name', operator: 'contains', placeholder: 'Search Activity'}">
</ul>

<script type="text/x-kendo-template" id="multiactivity-template">
  <label>
    <input data-id="${data.id}" type="checkbox" />
    ${data.name}
  </label>
</script>



This works great until the user enters any filter text, and then all the checkboxes get cleared. Is there a recommended approach to solve this? I have tried to data-bind to either the checked binding or doing something within the template using #= # scripts but cannot seem to solve it.

Thanks,

Ben.


Kiril Nikolov
Telerik team
 answered on 28 Mar 2014
3 answers
277 views
How do I set enable/disable based on a value in the observable?

I tried everything I can think of.

Thanks!
tahmed
Top achievements
Rank 1
 answered on 28 Mar 2014
2 answers
481 views
Some of the columns in my grid are bound to properties of nullable objects. When there exists a nullable object, filtering stops working because the property's owner is null. Is this not supported OOTB? If so, can anyone suggest some alternate solutions for this? Are the only options to flatten my JSON or to modify the received JSON in requestEnd?

Below is a plnkr that demonstrates the issue. Btw, not sure why the live preview isn't working. Click the 'Launch preview in separate window' to view the code in action. To reproduce, 1. filter the 'foo value' column with any value. 2. you will see the grid display a timer. the console will also display an error.

https://plnkr.co/edit/wCrMZM5ieDHVpjLJpHhP?p=preview
Syam
Top achievements
Rank 1
 answered on 28 Mar 2014
2 answers
2.1K+ views
We have data bound to a combox, all is working fine. When the user clicks the dropdown the list of items appears and is showing data assigned by the template  -> template: "#=FirstName # #=LastName #,  #=CompanyName #",
        
However, once the user selects something the datatextfield is shown, where as we want the same template shown. How can we do this?

Thanks - here is our code.


 $(this).kendoComboBox({
                placeholder: "Select A Client...",
                //dataTextField: 'LastName',
                dataValueField: 'ContactID',
                template: "#=FirstName # #=LastName #,  #=CompanyName #",
                filter: "contains",
                autoBind: false,
                minLength: 3,
                text: $(this).attr('data-text'),
                dataSource: {
                    type: "odata",
                    serverFiltering: true,
                    serverPaging: true,
                    page: 1,
                      pageSize: 50,                    
                    sort: { field: "Name", dir: "asc" },
                    filter: filter,
                    transport: {
                        read: {
                            url: "/ajax/comboContactFilter.json",
                        }
                    }
                }
            });
Eric
Top achievements
Rank 1
 answered on 27 Mar 2014
2 answers
219 views
Hello, I'm fairly new to Kendo & HTML5 so please bare with me. I'm looking for an example on how to actually use the values in the controller so that I can pass them to my BLL for processing but I can't seem to find anything where the values are being used in the controller. What am I missing?

Thanks!
Cool Breeze
Top achievements
Rank 1
 answered on 27 Mar 2014
1 answer
242 views
Im using the drawer to display a dynamic number of remote views. A PHP page is used to display the views:

data-views="['drawer-home', 'drawer-settings',  'item.php?id=1',  'item.php?id=2',  'item.php?id=3' ]

Loading the first view with Item 1 works fine, but then when switching to Item 2 the framework seems to think that it is the same page and displays the Item 1 view again.

How can I fix this?

And a second question, is it possible to force and update of a remote view? (Reload)
Petyo
Telerik team
 answered on 27 Mar 2014
2 answers
243 views
I have implemented custom rules for the Kendo Validator.  I would like to be able to use a format string for my error message and replace parameters in it with values from the validation.  For example, on the server side I am using a format string of: "{0} cannot contain two groups with the name '{1}'." and I replace {0} with a friendly name of the input and {1} with the duplicated group name (a value available as a result of the validation logic).  If I use this same string as the error message for the Kendo validation rule, the {0} is being replaced automatically by the value of the "name" attribute on the input being validated, and the {1} is being removed.

Is there a standard way for me to provide my own values to format the validation error message?

Thanks,
Brian
Brian
Top achievements
Rank 1
 answered on 27 Mar 2014
6 answers
272 views
I am using the MVVC pattern in my application.

On one view I am calling another view and passing a variable on "click" via  a dynamic ListView.  The datasource is being populated onShow.

It is working as expected on first usage but if 1) go BACK and choose another option OR 2) complete the first entry and try to create a new one - it blows trying to read the e.dataItem.{somevar}. Ideas why?

app.myService = {
        onShow: function (e) {
         ....
            $("#lvLevel2Options").kendoMobileListView({
                dataSource: kendo.data.DataSource.create({data: ds }),
                template: $("#templateCategoryLevel2").html(),
                click: app.myService.categoryClicked
            });
       }
 
        categoryClicked: function (e) {
 
            //It blows HERE but only on second pass
            var id= e.dataItem.id;
             ....
       }

Other info:  I checked the source of the List and see the data-uid values are changing each time i view the page as I would expect since the datasource is being refreshed onShow (it needs to be because it is dynamic filtered data).

Petyo
Telerik team
 answered on 27 Mar 2014
1 answer
87 views
I posted on StackOverflow http://stackoverflow.com/q/22665913/7850 but it's not getting much attention there, so here I am on these forums...
Sebastian
Telerik team
 answered on 27 Mar 2014
3 answers
333 views
Kendo UI version: 2013.3.1324
OS's:
- Windows 8.1 Pro
- Windows Server 2008 R2 Datacenter SP1
- Android 4.42 (Nexus 7 Build)
Browser versions:
- Internet Explorer 11.0.9600.16518 in emulation mode with user agent string Apple Safari (iPad)
- Google Chrome 33.0.1750.154m in emulation mode with devices "Apple iPad 3 / 4" and "Samsung Galaxy Tab 7.7, 8.9, 10.1"
- Google Chrome 33.0.1750.166 on Android 4.42 (Nexus 7 Build)
jQuery version: 2.1.0

On success of a jQuery post, we are setting the HTML contents of a Kendo UI Mobile View DIV with the content string below:
<form action="/Legend/Edit/89C29D66-7414-425F-89CD-3A580DFA8695" class="form-horizontal" data-ajax="true" data-ajax-method="POST" data-ajax-mode="replace" data-ajax-update="#AjaxReplace" id="form0" method="post" role="form">
<input data-val="true" data-val-number="The field Maximaal must be a number." data-val-required="The Maximaal field is required." id="ZoomMax" max="20" min="0" name="ZoomMax" type="range" value="20" />
<script>
jQuery(function(){jQuery("#ZoomMax").kendoSlider({"tickPlacement":"none","showButtons":true,"largeStep":5,"min":0,"max":20});});
</script>
<button class="btn btn-primary" type="submit">Submit</button>
</form>

As you can see, the ZoomMax value is 20, but the slider handle is positioned left and not draggable in the Mobile View. This is the case in IE and Chrome mobile emulation, as well on real mobile devices like the Asus/ Google Nexus 7. There are no errors in the browser console. See also the attached screenshot.

When setting an ASP.NET MVC view DIV with the same contents, the slider works normally.

Also, when setting Kendo Mobile View directly with the same contents, the slider works normally:
@(Html.Kendo().MobileView()
.Content(@<text>
<div id="legenditem-edit-container">
<form action="/Legend/Edit/89C29D66-7414-425F-89CD-3A580DFA8695" class="form-horizontal" data-ajax="true" data-ajax-method="POST" data-ajax-mode="replace" data-ajax-update="#AjaxReplace" id="form0" method="post" role="form">
<input data-val="true" data-val-number="The field Maximaal must be a number." data-val-required="The Maximaal field is required." id="ZoomMax" max="20" min="0" name="ZoomMax" type="range" value="20" />
<script>
jQuery(function(){jQuery("#ZoomMax").kendoSlider({"tickPlacement":"none","showButtons":true,"largeStep":5,"min":0,"max":20});});
</script>
<button class="btn btn-primary" type="submit">Submit</button>
</form>
</div>
</text>)
.Layout("MobileLayoutLegend")
.Name("LegendItemEdit")
.Title("Wijzig legenda-item")
)

How can we make a slider show the correct value and be draggable in a Mobile View which content is set using jQuery?
Ewoud
Top achievements
Rank 1
 answered on 27 Mar 2014
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
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
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?