Telerik Forums
Kendo UI for jQuery Forum
2 answers
144 views
Existing Service Layer With DTOs
How do I get my existing dataservice layer, which returns DTOs, to support virtual scrolling? I can pass the DataSourceRequest object to the service layer where the DTOs are created but I can't seem to translate the request object into any useful queries.

Manual Filtering Seems Clunky
I can manually implement some of the filtering by using switch statements but this has a horrible amount of overhead.

Dynamic Expression Trees
I was thinking maybe I could create something that parses the FilterDescriptors and creates LINQ Expression Trees to apply to the IQueryable somehow but this also seems to be a little complex for my liking. I like this idea because I can see the power of learning how this API works but I don't have the time to author this at the moment. I also don't know if this will be feasible for performance. 

Where are all the code examples?
I haven't seen any examples that help me tackle this problem. 

jwize
Top achievements
Rank 1
 answered on 10 Feb 2014
6 answers
2.0K+ views
I would like to change the color of the Kendo Mobile switch when it is in it's on position. By default it is white text in a blue background, but I want a green background.

I haven't been able to find the right css to do that and the themebuilder doesn't seem to be able to do that?

Any hints?
Zdravko
Telerik team
 answered on 10 Feb 2014
5 answers
352 views
This is what I'm trying...

<select data-value-field="Id" multiple="multiple" data-placeholder="Select Category..." data-text-field="Title" data-item-template="#: data.FullPath #" data-role="multiselect" data-type="HierarchicalTaxa" >

However its throwing an error
Error: Syntax error, unrecognized expression: ##: data.FullPath #

??
Georgi Krustev
Telerik team
 answered on 10 Feb 2014
2 answers
118 views
Hello,

I want to show a first chart with a datasource pagesize, then another with same datasource but another pagesize.

When trying following, I can see first chart show my first pagesize, then, when second chart shows, first chart pagesize is change to second page size.

see following example:

function createChart() {

myData.pageSize(20);

$("#MyChart").kendoChart({
dataSource: myData,
series: [{type: "bar",field: "nb",categoryField: "name",name: "#= group.value #",markers: {visible: true,size: 1},aggregate : "avg",},],
legend: {position: "bottom",labels: {template: "my name"}},
valueAxis: {visible:false,labels: {format: "{0}", step:3},majorGridLines: {visible: false},majorTicks: {visible: false},format: "{0}%",},
categoryAxis: {field: "my field",majorGridLines:{visible: false},majorTicks:{visible: false},},
tooltip: {visible: true,template: "#=category #: #= value #"},
transitions: true,
});

myData.pageSize(50);

$("#MyChart").kendoChart({
dataSource: myData,
series: [{type: "bar",field: "nb",categoryField: "name",name: "#= group.value #",markers: {visible: true,size: 1},aggregate : "avg",},],
legend: {position: "bottom",labels: {template: "my name"}},
valueAxis: {visible:false,labels: {format: "{0}", step:3},majorGridLines: {visible: false},majorTicks: {visible: false},format: "{0}%",},
categoryAxis: {field: "my field",majorGridLines:{visible: false},majorTicks:{visible: false},},
tooltip: {visible: true,template: "#=category #: #= value #"},
transitions: true,
});

}

$(document).ready(function() {
createChart();
});



Thank you,
Dan
dan
Top achievements
Rank 1
 answered on 10 Feb 2014
4 answers
122 views
Hi,

I have come across an issue where when I am using selectable: "multiple, cell", in combination with incell editing the editor is not always removed correctly.

If the incell editor is being displayed and then the user clicks either a single cell or off the grid the editor is correctly removed.
However if the user selects multiple cells then the editor loses focus, but is not removed. This leaves it on the screen.

I have been able to clear the editor by adding a change event to the grid:
change: function (e) {
  this.closeCell();
},

I am a little wary of my workaround as currently have a different issue with manually calling closeCell()
See: http://www.telerik.com/forums/grid-not-activeelement-when-selecting-a-single-cell-when-using-multiple-cell-select

Is this a bug?
Is my workaround correct and likely safe?

Thanks
Euan
Dimiter Madjarov
Telerik team
 answered on 10 Feb 2014
6 answers
91 views

Hi,

The documentation states the following about the change event: Fired when the user selects a cell or event in the scheduler.

During testing I discovered that the change event is raised whenever something on the scheduler is clicked i.e.

  • Show business hours
  • Date navigation

I tried to filter on the e.slots.length property of the event arguments, but this isn't robust enough. When you accidently select a slot and click "Show business hours", the e.slots array is not reset.

Kiril Nikolov
Telerik team
 answered on 10 Feb 2014
1 answer
56 views
Hi,

I have a scheduler that is configured to allow selection.  Rather than showing the default edit pop-up that is triggered by hitting [enter] we have wired up a custom dialog that appears as soon as the user releases the mouse after making a selection.

When the standard dialog opens, I can see it creates a temporary event on the scheduler for the selected date-range and that event is removed and the selected range reinstated if the user cancels the dialog.

I have been able to generate and remove the temporary event with my custom dialog but not found a way to reinstate the selection.  Is there an API for this that I have missed?

Thanks
Vladimir Iliev
Telerik team
 answered on 10 Feb 2014
7 answers
191 views
Hi,

I am currently using a combination of:
selectable: "multiple, cell",
edit: function (e) {
  if (e.model[e.field].readOnly) {
    this.closeCell();
  }
}
edit function comes from http://www.telerik.com/forums/how-to-make-cell-editable-based-on-value-of-another-cell-in-grid

This allows me to make individual cells read only, which is working great.
My problem occurs as I have logic that is bound to the grid that requires it to be focussed after a select.
Current behaviour that I see is:
1) If selecting >= 2 cells either horizontally or vertically the edit event is not fired and the grid has focus - Correct
2) If selecting a single cell that is not read only the editor is displayed and has focus - Correct
3) If selecting a single cell that is read only the editor is not displayed, but the grid has lost focus. - Incorrect

It appears that the activeElement is being reset to the document body by the this.closeCell(); even though the editor is never displayed.

Is their some way I can either prevent the edit without using closeCell() or "fix" the loss of focus after calling closeCell().
I have tried adding a this.focus(); after closeCell() but the grid still doesn't get focus.

Thanks
Euan

Euan
Top achievements
Rank 1
 answered on 10 Feb 2014
1 answer
56 views
It seems like clicks on the close cross (upper right corner) of a calendarevent will propagate to the rest of the DOM.
Maybe I am just doing something incorrectly.

Is it an intended behavior?
100%
Top achievements
Rank 1
 answered on 10 Feb 2014
4 answers
176 views
Hello,

We have a responsive web design targeting with first. I am currently using the bootstrap 3 carousel control for images, however, we would like to move to the Kendo Mobile ScrollView to use the swipe actions when on mobile.

I have been trying to integrate the mobile ScrollView into the page using MVC wrappers without luck. I'm not looking for syntax help, I just need to know if it can be done, if so, a sample would be great.

I'm fairly new to the Kendo widgets, I noticed there is no MVC wrapper demo for databinding the mobile scrollview? I was hoping to use that as my starting point to learn the syntax. 

I have been messing with this in all sorts of configurations trying to get it to work unsuccessfully, I think I'm missing some core guidance.
Thank you.

My script bundle:
bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
            "~/Scripts/kendo/kendo.all.min.js",
            "~/Scripts/kendo/kendo.mobile.min.js",
            "~/Scripts/kendo/kendo.aspnetmvc.min.js"));

My style bundle:
bundles.Add(new StyleBundle("~/Content/kendo/css").Include(
            "~/Content/kendo/kendo.mobile.all.min.css",
            "~/Content/kendo/kendo.common-bootstrap.min.css",
            "~/Content/kendo/kendo.bootstrap.min.css"));


My layout page:
@Styles.Render("~/Content/css")
@Styles.Render("~/Content/kendo/css")
 
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@Scripts.Render("~/bundles/kendo")

On my view page:
<div class="row">
    <div class="col-xs-12 col-lg-8 col-centered" style="max-width:600px;">
        <div data-role="view">
            @(Html.Kendo().MobileScrollView()
            .Name("adRotator")
                .DataSource(ds => ds.Read("GetAdRotatorImages", "Ads", new{id = Model.AdId}))
            )
        </div>
    </div>
</div>

And I have tried with and without this at the bottom of the page:
<script>
    var app = new kendo.mobile.Application();
</script>


Thank you,
Richard
Kiril Nikolov
Telerik team
 answered on 10 Feb 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
Dialog
Chat
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
TextArea
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?