Telerik Forums
Kendo UI for jQuery Forum
1 answer
99 views
Hi Everyone,

I am checking test-ability of Kendo UI application with CUIT (Coded UI of Microsoft). Whenever I added Id property it reflecting to edit control not for whole datePicker control, because of we are not able perform action second DatPicker Calendar icon.

How can I provide Id property to whole  DatPicker Kendo UI control..

Regards,
Rajendar.
Atanas Georgiev
Telerik team
 answered on 13 Nov 2014
1 answer
639 views
Hi, I'm able to "disable" cells using the method I've found recommended in the forums, which is the grid's closeCell() method. However, I have event listeners on elements in the cells (specifically Twitter Bootstrap popovers, although those can be switched with Kendo tooltips if that makes this easier), which are removed when the cell enters and leaves editing mode (even when it is imperceptible as when immediately calling closeCell()), presumably because the content is removed from the DOM and then reinserted from the template). To avoid having to rebind the listeners on every click of the cell, is there any way to stop the cell from going into edit mode in the first place?

Thanks
Kiril Nikolov
Telerik team
 answered on 13 Nov 2014
5 answers
315 views
Hi all,

To put things in context first, this is the requirement I have got:
There are two groups of users - A and B. "A" users can create so-called "disponibility" events.
"B" users should be able to add "reservation" events to the scheduler only in the boundaries of the "disponibility" events created by "A" users. In case they click outside a "disponiblility" event, no scheduler event is created, just a popup saying "Please select a time whiting a disponibility", or something in that sense.
When a "B" user loads the scheduler, he should see all the "disponibility" events, plus eventually his own "reservation" events;

I'm using MVC4,Razor, Javascript/Jquery.

So far I have managed to block "B" users from creating an event outside events created by "A" users.

What I'm struggling with is how to make "B" users create their events on top of the events of "A" users. The idea I have for now, is to track the Edit event coming from the scheduler and transform it to an Add event. Supposedly this should show up the popup for adding an event.

The problem I see, not sure if this is a bug or not, when I call $scheduler.addEvent(...), the popup appears for a fraction of a second, then there is some flickering happening on the scheduler (refresh probably) and the popup disappears.
Here's a portion of the code:

=> event binding when declaring the scheduler

.Events(events => events.Edit("scheduler_edit")

=> the respective javascript function to handle the above event

function scheduler_edit(e) {
    if (e.event.IsAppointment == true) {
             e.preventDefault();
        $scheduler = $("#scheduler").getKendoScheduler();
        $scheduler.addEvent({ start: e.start,  end: e.end  });
}

I'd like to have an advice about :
- is this approach the right one ?
- is it normal that the "add event" popup is disapearing after the addEvent call.

Thanks a lot.
Mario
Top achievements
Rank 1
 answered on 13 Nov 2014
1 answer
136 views
When I move event that is on the very left hand side of timeline further to the left, it's start time is decreased. Can we block this?
For example dragging the "1" event to the left here http://dojo.telerik.com/IMeXa will set start time to an earlier than 7am.
Alexander Popov
Telerik team
 answered on 13 Nov 2014
3 answers
429 views
I have a grid that I'm assigning as a child template to a parent grid.  The child template looks like this:

<script id="client-template" type="text/x-kendo-template">
    @(Html.Kendo().Grid<EnrolledUnit>()
        .Name("grid_#=Enrolment.EnrolmentId#")
        .Columns(columns =>
        {
            columns.Bound(enrolledUnit => enrolledUnit.DisplayName);
        })
        .DataSource(dataSource => dataSource
            .Ajax()
            .Read(read => read
                .Action("EnrolledUnits_Read", "EnrolledUnits", new { enrolmentId = "1" })
            )
        )
        .ToClientTemplate()
    )
</script>

In particular, this line is what I need help with: Name("grid_#=Enrolment.EnrolmentId#")

That line doesn't work - the parser fails (returns a Javascript error saying "Invalid template").  It seems to be the use of dot syntax within that Name method that's causing the issue.  If I change my template to this:

<script id="client-template" type="text/x-kendo-template">
    #=Enrolment.EnrolmentId#
</script>

The EnrolmentId is output with no issues, proving that the item exists and the property exists and is populated. It seems to be using the dot syntax in the Name method specifically that is causing the problem.
Kiril Nikolov
Telerik team
 answered on 13 Nov 2014
1 answer
163 views
The kendo documentation specifies two ways to create an observable object: 

var viewModel1 = new kendo.data.ObservableObject( {
  field1: "value1",
  field2: "value2"
});
 
var viewModel2 = kendo.observable( {
  field1: "value1",
  field2: "value2"
});

but what should be used when a regular javascript object already exists, and needs to become observable?
for example, a DTO object that is being returned by a web service or one that is already created as follows:

var viewModel = {
    name: "John Doe"
};
Petyo
Telerik team
 answered on 13 Nov 2014
1 answer
132 views
i have three different charts under three different <div>. Which is placed under bootstrap tab. Initially when the page loads the first chart is loading properly. If i click on the second tab the second chart will be displayed but the chart size is getting reduced from the actual size. same is happening for the third tab also. If press f12 in my chrome then the chart is coming back to initial stage!. Basically the resize is not working..

Any help?
Iliana Dyankova
Telerik team
 answered on 13 Nov 2014
1 answer
92 views
I am experimenting with the kendo grid samples from your demo pages.
I can get them to run within the vs 2013 dev server, but when I install to the localhost IIS7 server and test there is no display. The html is loaded but the browser renders a blank page. The application pool is set to .net 4.
My visual studio project is just the basic mvc starter project, and I have added html pages and copied in the demo code. The pages run well with vs, but not in IIS. 
I have no clue what's wrong.
Paul
Top achievements
Rank 1
 answered on 12 Nov 2014
5 answers
422 views
Dear Telerik team,

is it possible to define more complex measures/aggregations than a simple sum for FLAT DATA?
... e.g. a calculating percentages, ratios, margins, etc. based on given datasource fields?

Simplified Example:

#these are the source data records:

Product        Category                      SalesChannel    Costs    Revenue
P1                 Mountain Bikes             Internet             2000    3000
P2                 Mountain Bikes             Internet             1000    2000
P3                 Mountain Bikes             Store                 3000    5000
P4                 Mountain Bikes             Store                 5000    6000
P5                 Accessoires                  Store                   100      150
P6                 Accessoires                  Internet                 80      100
P7                 Accessoires                  Store                     50        60
P8                 Accessoires                  Internet                 10        15

# We want to show the gross margin for each combination of category and sales channel with the formula:
      gross margin = (revenue-costs)/revenue

# This should lead to the following pivotgrid matrix as result:
                                                                      All Sales Channels
                                                                      Internet         Store        All Sales Channels
All Categories             Mountain Bikes             21,7%        28,6%        26,2%
                                   Accessoires                   40,0%        27,3%        31,3%
                                   All Categories                39,6%        27,3%        31,1%    

Thanks a lot for your suggestions
and best wishes from Germany
Jens
Georgi Krustev
Telerik team
 answered on 12 Nov 2014
1 answer
717 views
Is there any way to force a grid with virtual scrolling to recalculate its scroll bar?

I have a grid which is initialized whilst being hidden.  When i show the grid, i can get everything resized just fine, and the grid looks like it's ready for action.  However, if the grid has virtual scrolling enabled, the scrollbar will be visible, but set to a height of zero - meaning that whatever records are showing on the grid is all you can access, because the grid can't be scrolled down.  I can call myGrid.refresh(), but that doesn't appear to help.

As far as i can tell, the only simple way to correct this is to do another read operation myGrid.dataSource.read().  Is there any way around that?  It seems like overkill, since the grid is already set up just fine.  All it should really need to do is just recalculate the height of a row and then guess the full height - just like it would normally do.

I tried a number of work arounds, but i kept ending up with JS errors.  For example, i noted that the k-scrollbar-vertical element of the grid has a child div with the height which the grid has guessed it will need.  So it might look like this:

<div class="k-scrollbar k-scrollbar-vertical" style="width: 18px;">
     <div style="width:1px;height:8077.5599999999995px"></div>
</div>

Since that inner div is missing in my off-screen initialized grid, i tried inserting it manually.  Everything looked good then - the grid had a scroll bar and everything.  However, attempting to scroll just results in JS errors.

I've seen some other posts that are related to this, and it appears that non-visible initialization of the grid is "not supported".  But is there any way to just do this one thing - to force it to refresh the scroll bar data?

Kiril Nikolov
Telerik team
 answered on 12 Nov 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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
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
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?