Telerik Forums
Kendo UI for jQuery Forum
7 answers
104 views

not sure if you need sample code, but effectively, tis is what is happening. I have adaptive rendering turned on. using a real phone LG G2 and htc ??, i forget, but they both behave the same.  Both using chrome browsers.

double tap on open scheduler to create a new event. screen does slide to show new event input. I click into "title" in order to enter the event name. as soon as the virtual keypad is displayed, UI slides back to scheduler view. Cancelling the new event so to speak.

 

this does not happen when select "all day" or clicking "never" to make recurring. Only the text entries of title and description cause widget to reset.

 

any ideas?

Robert
Top achievements
Rank 1
 answered on 26 Sep 2016
1 answer
294 views

Hi,

Following is my code which tries to create kendo grid based on table data. Inside the kendo grid section, how can I add columns width? Also, sorting on currency columns (InvoiceTotal, CreditAmount, and DueAmount) are not sorting as numbers but it is sorting as string. Can someone help me please. i made sure that these fields inside InvoiceHeaderInfo class are of type decimal.

 

@model  IEnumerable<KendoUIApp2.Models.InvoiceHeaderInfo>
@{
    ViewBag.Title = "Index";
}
@{
    <script type="text/javascript">
        function AlertMsg(e) {
            alert(e);
            //alert($("#InvoiceGrid").data.height);
            return false;
        }
        $(function () {
            $("#InvcList").kendoGrid({
                
                toolbar:["excel","pdf"],
                excel:{allpages:true},
                pdf: {
                    allPages: true,
                    avoidLinks: true,
                    paperSize: "A4",
                    margin: { top: "2cm", left: "1cm", right: "1cm", bottom: "1cm" },
                    landscape: true,
                    repeatHeaders: true,
                    template: $("#page-template").html(),
                    scale: 0.8
                },
                sortable: true,
                pageable: true,
                dataSource: { pageSize: 5, name:"InvoiceGrid"},

 

                databound: function (e) {
                    $(".View-Link").click(function (e) {
                        e.preventDefault();
                        alert('hi');
                        alert($(this).id);
                    })

                }
            });
            
        });
       // alert($("#InvcList").kendoGrid().columns(0).name);
    </script>


}
<h2>Search For Invoices</h2>
@using (Html.BeginForm("Index", "IHWithParams",FormMethod.Get))
{
    <table>
        <tr>
            <td>
                PO #:
            </td>
            <td>
                @Html.TextBox("strPO")
            </td>
        </tr>
        <tr>
            <td>
                PO Release #:
            </td>
            <td>
                @Html.TextBox("strPORel")
            </td>
        </tr>
        <tr>
            <td>
                Invoice Date Range:
            </td>
            <td>
                @Html.Kendo().DatePicker().Name("strStart")
                @Html.Kendo().DatePicker().Name("strEnd")

            </td>
        </tr>
            <tr>
                <td colspan="2">
                    <input type="submit" value="Search" />
                </td>
            </tr>
    </table>
}
<table id="InvcList">
    <thead>
        <tr>
            <th data-field="InvoiceID">
                Invoice #
            </th>
            <th data-field="PurchaseOrder">
                PO #
            </th>
            <th data-field="POReleaseNum">
                PO Release #
            </th>
            <th data-field="InvoiceDate">
                Date
            </th>
            <th data-field="InvoiceDueDate">
                Due
            </th>
            <th data-field="InvoiceTotal" data-sortable="true">
                Total
            </th>
            <th data-field="CreditAmount">
                Credit
            </th>
            <th data-field="DueAmount">
                Balance
            </th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.ActionLink(@item.InvoiceID,null, null, new { onclick = "return AlertMsg('" + @item.InvoiceID + "')" })
                </td>
                <td>
                    @item.PurchaseOrder
                </td>
                <td>
                    @item.POReleaseNum
                </td>
                <td>
                    @if (item.InvoiceDate.HasValue)
                    {
                        //@item.InvoiceDate.Value
                       @String.Format("{0:MM/dd/yyyy}", @item.InvoiceDate.Value)
                    }                
                </td>
                <td>
                    @if (item.InvoiceDueDate.HasValue)
                    {
                       @String.Format("{0:MM/dd/yyyy}", @item.InvoiceDueDate.Value)
                    }
                </td>
                <td>
                     @String.Format("{0:c}", @item.InvoiceTotal)
                </td>
                <td>
                   @String.Format("{0:c}", @item.CreditAmount)
                </td>
                <td>
                    @String.Format("{0:c}", @item.DueAmount)
                </td>
            </tr>
        }
    </tbody>
</table>

Dimo
Telerik team
 answered on 26 Sep 2016
5 answers
271 views

Hello,

I'm trying to use the Kendo UI Angular chart directive. My situation is that I have web services that return line data (x/y coordinates) in JSON, and I'm trying to figure out a way to bind that data to the chart. I haven't found very much clear documentation on this and was wondering if there is an example or tutorial that I could follow to get set up. I have Angular services that make calls to my API and are currently grabbing the data - I just need a way of binding that to the chart. A sample of the response for one of the lines is pasted below. Thank you in advanced.

[{"xValue":0.0,"yValue":12274.36},
{"xValue":50.0,"yValue":12352.83},
{"xValue":100.0,"yValue":12373.48},
{"xValue":150.0,"yValue":12344.57},
{"xValue":200.0,"yValue":12249.58}]
Iliana Dyankova
Telerik team
 answered on 26 Sep 2016
3 answers
486 views
Is there a template option for the resource group title area? We have long grouping names that are pushing the k-slot too wide and when we apply some text formatting we end up with the text looking funny. We would like to add more information about the resource as well to that slot but cannot find a template segment in the documentation.
Vladimir Iliev
Telerik team
 answered on 26 Sep 2016
1 answer
104 views

Hello, 

I have a grid which utializes pushUpdate method and i noticed that when data get pushed to grid, the grid filters are completly ignored. Should i force filter the dataSource after each pushUpdate ? 

Boyan Dimitrov
Telerik team
 answered on 26 Sep 2016
4 answers
898 views

I have a Scheduler which I am using the vertical orientation to load custom resources. I have the date and time across the top with a list of room resources down the left hand side. These populate fine but I am using a custom editor when someone clicks on a cell to load the entity. My scheduler looks like this:

 

@(Html.Kendo().Scheduler<EventViewModel>()
    .Name("scheduler")
    .Date(DateTime.Now.AddDays(1))
    .StartTime(new DateTime(2016, 9, 6, 9, 00, 00))
    .EndTime(new DateTime(2016, 9, 6, 17, 00, 00))
    .MajorTick(60)
    .Views(views =>
    {
        views.TimelineView(timeline => {
            timeline.MajorTick(60);
            timeline.EventHeight(25);
        });
        views.TimelineWeekView(timeline =>
        {
            timeline.EventHeight(25);
        });
        views.TimelineWorkWeekView(timeline =>
        {
            timeline.EventHeight(25);
        });
        views.TimelineMonthView(timeline =>
        {
            timeline.EventHeight(25);
        });
 
    })
    .Editable(editable =>
    {
        editable.TemplateName("CustomEditorTemplate");
    })
.Events(e =>
{
    //    e.Save("onSave");
    e.Edit("onEdit");
    e.Add("onAdd");
})
.Timezone("Etc/UTC")
.Group(group => group.Resources("Rooms").Orientation(SchedulerGroupOrientation.Vertical))
.Resources(resource =>
{
    resource.Add(m => m.RoomID)
        .Title("Room")
        .Name("Rooms")
        .DataTextField("Text")
        .DataValueField("Value")
        .DataSource(s => s.Read(read =>
        {
            read.Action("GetRooms", "Schedules");
        }));
})
.DataSource(dataSource => dataSource
    .SignalR()
    .Events(events => events.Push("onPush"))
    .Transport(tr => tr
        .Promise("hubStart")
        .Hub("courseEventHub")
        .Client(c => c
            .Read("read")
            .Create("create")
            .Update("update")
            .Destroy("destroy"))
        .Server(s => s
            .Read("read")
            .Create("create")
            .Update("update")
            .Destroy("destroy")))
    .Schema(schema => schema
        .Model(model =>
        {
            model.Id(m => m.ID);
            model.Field(m => m.ID).Editable(false);
 
        })
    )
    )
)

In the custom editor I can retrieve the RoomID from the resource but I also want to get the Room Name, which is the Text of the resource.

 

 

@model HSSTraining.Models.EventViewModel
 
@{
    //required in order to render validation attributes
    ViewContext.FormContext = new FormContext();
}
 
@functions{
    public Dictionary<string, object> generateDatePickerAttributes(
           string elementId,
           string fieldName,
           string dataBindAttribute,
           Dictionary<string, object> additionalAttributes = null)
    {
 
        Dictionary<string, object> datePickerAttributes = additionalAttributes != null ? new Dictionary<string, object>(additionalAttributes) : new Dictionary<string, object>();
 
        datePickerAttributes["id"] = elementId;
        datePickerAttributes["name"] = fieldName;
        datePickerAttributes["data-bind"] = dataBindAttribute;
        datePickerAttributes["required"] = "required";
        datePickerAttributes["style"] = "z-index: inherit;";
 
        return datePickerAttributes;
    }
}
 
<div class="k-edit-label">
    Course
</div>
 
<div data-container-for="Courses" class="k-edit-field">
    @(Html.Kendo().AutoComplete()
          .Name("courses")
          .Filter("contains")
          .Placeholder("Find Course...")
          .DataTextField("CourseName")
          //.BindTo(Model.SelectedCourse)
          .DataSource(s =>
                {
                    s.Read(read =>
                    {
                        read.Action("GetCourses", "Schedules");
                    })
                    .ServerFiltering(false);
                })
            .Events(t => t.Select("changedMe"))
    )
</div>
 
<div class="k-edit-label">
    @(Html.LabelFor(model => model.Start))
</div>
 
<div data-container-for="start" class="k-edit-field">
    @(Html.Kendo().DateTimePickerFor(model => model.Start)
        .HtmlAttributes(generateDatePickerAttributes("startDateTime", "start", "value:start,invisible:isAllDay")))
    @(Html.Kendo().DatePickerFor(model => model.Start)
        .HtmlAttributes(generateDatePickerAttributes("startDate", "start", "value:start,visible:isAllDay")))
    <span data-bind="text: startTimezone"></span>
    <span data-for="start" class="k-invalid-msg"></span>
</div>
 
<div class="k-edit-label">
    @(Html.LabelFor(model => model.End))
</div>
 
<div data-container-for="courseEndDate" class="k-edit-field">
    @Html.EditorFor(model => model.End, new { @class="courseEndDate" })
    @*<input id="courseEndDate" type="text" readonly="readonly" class="form-control" />*@
</div>
 
<div class="k-edit-label">
    <label>Room</label>
</div>
<div data-container-for="courseRoomName" class="k-edit-field">
    <input type="text" class="form-control" id="courseRoomName"  />
</div>
 
 
    <div id="hiddenFields">
        @Html.HiddenFor(model => model.RoomID)
        @Html.HiddenFor(model => model.CourseID)
    </div>
 
 
    @{
        ViewContext.FormContext = null;
    }

 

I have tried to bind the text to the model but I have been unable to do so. Instead I am now trying to do this via javascript like this:

 

function onAdd(e) {
    console.log(e);
 
    var scheduler = $("#scheduler").data("kendoScheduler");
    var array = scheduler.resources[0].dataSource._data;
 
    var test = $.grep(array, function (item) { return item.Value == e.event.RoomID; });
    console.log(test[0]);
 
    $('#courseRoomName').val(test[0]);
}

Whatever I seem to do I seem to be unable to pass the text name of the resource through to the custom editor model/page

Georgi Krustev
Telerik team
 answered on 26 Sep 2016
3 answers
801 views

I am using Autocomplete in angular, and I see that I get an array bound to the k-ng-model. 

Here is an example that shows the behavior.

http://dojo.telerik.com/uzefE

Is there a way to get the autocomplete to bind to a single object instead of an array?

Thank you

Dimiter Topalov
Telerik team
 answered on 26 Sep 2016
2 answers
82 views

There are two queries in Timeline Week view of Scheduler:

1) Is it possible to filter vertical axis configurations based on configurations associated parameter (Each configuration carries its physical location). 

 I have a custom filter on page, as soon as i enter location in that filter, it should filter vertical axis configurations based on entered value.

In the attached file, all red configurations has location 'A', all blue has location 'B' and the black has location 'C'

Only black configuration has appointments. However, blue and red doesn't have appointments.

I'm trying to filter out blue and red configurations from the vertical axis by entering physical location of black one i.e. 'C' in custom filter. So on vertical axis, i should not see blue and red configurations since it has location as A and B.

Here are the views:

views: [
                    {
                        type: "day",
                        title: "Today",
                        workDayStart: new Date("2016/1/1 07:00 AM"),
                        workDayEnd: new Date("2016/1/1 07:00 PM")
                    }, {
                        type: "week",
                        title: "Week",
                        selected: true,
                        workDayStart: new Date("2016/1/1 07:00 AM"),
                        workDayEnd: new Date("2016/1/1 07:00 PM")
                     },
                    {
                        type: "workWeek",
                        title: "Work Week",
                        workDayStart: new Date("2016/1/1 07:00 AM"),
                        workDayEnd: new Date("2016/1/1 07:00 PM")
                    },
                    {
                        type: "agenda",
                        eventTemplate: "<reservation-agenda></reservation-agenda>"
                    },
                    {
                        type: "timelineWeek",
                        columnWidth: 150,
                        majorTick: 720,
                        minorTickCount: 1,
                        group: {
                            resources: ["Configurations"],
                            orientation: "vertical"
                        },
                        workDayStart: new Date("2016/1/1 07:00 AM"),
                        workDayEnd: new Date("2016/1/1 07:00 PM")
                    },
                    {
                        type: "timelineWorkWeek",
                        columnWidth: 150,
                        majorTick: 720,
                        minorTickCount: 1,
                        group: {
                            resources: ["Configurations"],
                            orientation: "vertical"
                        },
                        workDayStart: new Date("2016/1/1 07:00 AM"),
                        workDayEnd: new Date("2016/1/1 07:00 PM")
                    }
                ],

Basically need some way to filter vertical axis configurations based on condition in Timeline Week view

2)In the attached file, the yellow circle mark has the current time shown as red line. Can't we display the current time or display current time on hover over red line. It will tell upfront the current time and will be more intuitive to user.

 

Matt Dufrasne
Top achievements
Rank 1
 answered on 26 Sep 2016
6 answers
144 views

running this scheduler demo: http://dojo.telerik.com/AKEbi/2

essentially, took y'alls adaptive demo and added-->toolbar: ["pdf"], to initialization.

 

However, PDF button does not appear. I know when mobile is NOT set, then "export pdf" button appears. How can i get the PDF button to reappear?

Ivan Danchev
Telerik team
 answered on 23 Sep 2016
3 answers
115 views

please see attached. I have gone through numerous "message" settings, but i can't seem to figure it out. What is the setting/path for changing the text circled in green?

 

adaptive screen, click on "none" for repeat on main editor in order to actually set recurrence. the window title at top.

Robert
Top achievements
Rank 1
 answered on 23 Sep 2016
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
ScrollView
Switch
TextArea
BulletChart
Licensing
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
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?