Telerik Forums
Kendo UI for jQuery Forum
1 answer
230 views

Hi,

I am trying to determine what might be causing this issue. Both on mobile apps and in the browser I am running in to an issue at times where the app freezes with the loading spinner that normally displays briefly when first loading a remote view into the kendo ui app. However this often occurs when leaving that mobile view and going to another view. In Chrome nothing is logged in the console as errors but the app hangs and must be restarted. Sometimes this has happened on normal views but not very often. Any ideas as to what might be triggering this or any suggestions?

Thank you,
Steven

Stefan
Telerik team
 answered on 27 Sep 2016
3 answers
1.0K+ views

Hi Telerik Team,

Here I have a scenario working on telerik KendoUI grid with frozen column. I have a set of frozen columns and a set of scroll columns which are on the right side of the grid .We have a grid that shows availability of resource for the certain time interval  shown in weeks. Resource name,project name,skills are frozen columns and say for an example weeks starting from Sep 1- Dec 15 to be shown as scrolled columns.So these week column are dynamic in nature. I got the grid as above by giving static columns but the requirement is that these columns are dynamic. Again I tried to create columns dynamically through JavaScript in a loop but I lost the frozen column feature in the grid. Thanks for any help.

 

Thanks and Regards

Boney M
boney
Top achievements
Rank 1
 answered on 27 Sep 2016
2 answers
489 views

Hello,

 

We have problems with copy/paste in kendo grid: it stops working in the following scenario.

I have created the following Dojo (modified from the Demo of Grid > Filter row. Just added properties: selectable and allowCopy).
http://dojo.telerik.com/odUSo

Steps:

0) Open dojo link above
1) Select one (or multiple) cells and press "CTRL+C".
2) Open notepad and paste text. You will see that it is copied and pasted right.
3) Click on any row filter element, i.e. OrderId 
4) Select one (or multiple), but different cell(s) and press "CTRL+C".
5) Go to notepad again and paste. You will see that wrong text is inserted (which was copied on step 1)

 

Looks like focus stays on filtering element and copying doesn't happen.

 

Could you please help with this?

 

Thanks

Anton
Top achievements
Rank 1
 answered on 27 Sep 2016
7 answers
108 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
300 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
279 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
489 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
105 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
914 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
810 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
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?