Telerik Forums
Kendo UI for jQuery Forum
1 answer
100 views

Is there not a way to instruct the Grid to format dates and times in another timezone other than the browser's timezone?

For example, if you consider the example at example you'll see that the date of '2020-01-01T18:45' is formatted as 'Wed Jan 01 2020 18:45:00 GMT-0500 (Eastern Standard Time)' because I am in the EST timezone.  This is great. 

But what if I want it formatted in the PST timezone?

For example, if the date string provided is '2020-01-01T18:45-08:00', the formatted date in the example is 'Wed Jan 01 2020 21:45:00 GMT-0500 (Eastern Standard Time)' which is correct.  But how do I get the Grid to render 'Wed Jan 01 2020 18:45:00 GMT-0800 (Pacific Standard Time)'.

 

Neli
Telerik team
 answered on 20 Dec 2023
1 answer
362 views

Hi,

Have a question regarding pagination or adding records as I need them to a Kendo UI grid. I am not even sure how to express or ask this question.
Want to add records as I scroll down/up on a grid, and remove the ones not visible in the grid. Ultimately, I only want to show a portion of the records the API can grab from the database.

The idea is I might pull in 1,000 +  records and only want to show like 20 on the screen, the ones not visible are NOT in the client on the browser. One of my coworkers mentioned I could do this with "Pagination". Where you would dynamically call the API for more records as you scrolled down (or up) to add the non-visible records. How do you do this with a Kendo Grid?

Would I need to request records 1-20, then when I move down it loads 20-40, and when 20 is at the top it only refreshes 20-40;  discarding 1-19? How does that work? Is there a mechanism that handles this?

Do I have to coordinate this with the API some how so I only get records 1-N, do I have to specify this somehow with the API?


•If the original 20 leave the uper edge of the grid -> then unload them.
•If I scroll down past 20 --> load 20 more
• If I scroll up --> load the previous 20.

How would I achieve this?

Thanks!

George

Martin
Telerik team
 answered on 18 Dec 2023
1 answer
97 views

Hi,

as the title says i'm trying to open an alert on the Select Event of a kendoContextMenu, but the alert is shown only after the Select function is completed, is it possible to show an alert as soon as the user clicks on the ContextMenu option (at the start of the Select Event)?

Below the Select Event of my code:

 select: function (e) {
     alert("Test Alert"); //This one appears only after that the Select function ends, but i'd want it to appear as soon as the select function starts

    //MY CODE
}

Thanks in advance,

- Antonio

Neli
Telerik team
 answered on 15 Dec 2023
1 answer
64 views

Hi Team,

KendoListView Data Source listing structure is completely different in different KendoListView versions.

In 2019.2.619

Data is coming directly under given div



In 2020.3.1118

Data is coming under k-listview-content div


Regards,

Christy.

Zornitsa
Telerik team
 answered on 14 Dec 2023
1 answer
97 views

Hello Telerik

First check this example : https://dojo.telerik.com/oraZInUQ

Q1. When constructing a diagram like this, if the length of the textblock text becomes larger than the length of the rectangle, is there a way to control this? I wish there was a line break.

Q2. The length of the text is longer, so the selection area for the shape has increased. I want the selection area to be based on the width and height of the rectangle. Is it possible to adjust the selection area of ​​shape?

Thank you for your reply.

Nikolay
Telerik team
 answered on 14 Dec 2023
0 answers
68 views

I have a line chart and an area chart.

I would like the area chart to be shown inside of the line chart.

How can I control the area chart's height or top margin? To keep it inside the line chart?

Here is what my chart looks like. I would like to keep the green area inside of the red. Is this possible?

https://dojo.telerik.com/@jerry/owIdiWes

 

 

Jerry
Top achievements
Rank 1
Iron
Iron
Iron
 asked on 12 Dec 2023
1 answer
115 views

Hi team,

I have a question regarding the Kendo Grid in jQuery. Is there a way to implement a functionality where clicking the header checkbox on the first page selects or deselects all rows on that page and across all pages, including updating all the header checkboxes?

Thanks,
Swapnil
Martin
Telerik team
 answered on 12 Dec 2023
1 answer
231 views

Here is HTML Code of Date Picker

 

<input kendo-date-picker="" k-scope-field="dteNewDueDateDate" k-format="'yyyy-MM-dd'" k-on-change="undefined" custom-date="" ng-model="vm.target.newDueDate" required="" ng-class="{ 'is-invalid': (changeDueDateForm.dteNewDueDateDate.$dirty || changeDueDateForm.$submitted) &amp;&amp; changeDueDateForm.dteNewDueDateDate.$error.required }" ng-disabled="false" aria-label="New Due Date" name="dteNewDueDateDate" id="dteNewDueDateDate" entity="undefined" field="undefined" config="" class="ng-pristine ng-untouched k-input-inner ng-empty ng-invalid ng-invalid-required" data-role="datepicker" type="text" role="combobox" aria-expanded="false" aria-haspopup="grid" aria-controls="dteNewDueDateDate_dateview" autocomplete="off" aria-disabled="false" aria-readonly="false" aria-invalid="true" style="">

 

I have Tried this and Similar Solutions but all in Vain. Please help me to find its solution

$(document).ready(function() {   // Wait for the document to be fully loaded   // Initialize the Kendo UI DatePicker  $("#dteNewDueDateDate").kendoDatePicker({     format: "yyyy-MM-dd"    // Add any other configuration options you need  });   // Set the value after initialization  setTimeout(function() {     var datePicker = $("#dteNewDueDateDate").data("kendoDatePicker");     var targetDate = new Date('2023-12-04');     datePicker.value(targetDate);     datePicker.trigger("change");   }, 100); // Adjust the timeout duration if needed});

Neli
Telerik team
 answered on 07 Dec 2023
1 answer
490 views

Hello,

I'm using PDF Viewer with PDF.js processing and want to limit the number of pages displayed when receiving a large PDF file because its rendering makes the page load very slow.

For example, I receive a file with 100 pages from the server and I want to render and display only the first 10, and if the user wants to view the rest, he can download the entire file.

I found some solution on github, but it requires changes to the source code of the kendo.js library. Can I do something similar with just the PDF Viewer API?

const MAX_PAGES = 3; PDFJS.getDocument(params).then((doc) => { Object.defineProperty(doc, 'numPages', { value: Math.min(doc.numPages, MAX_PAGES) }); this.pdfViewer.setDocument(doc); // Other stuff }

Neli
Telerik team
 answered on 07 Dec 2023
1 answer
244 views

Hello

i need to change custom command icon depend on row field for instance "Status" i tried this code but it doesn't work

@using EliteInsurer.Areas.Admin.Dto;
@using Kendo.Mvc.UI;
<div class="k-rtl">
    @(
        Html.Kendo().Grid<HostedTaskDto>()
        .Name("grid")
        .Columns(columns =>
        {
                columns.Bound(m => m.Status);
                columns.Command(p =>
                {
                p.Custom("StartTask").Text(" ").Click("changestatus").IconClass("#=getCommandIcon#");

            });

        })
        .ToolBar(tools =>
        {
            tools.Excel();
            tools.Create().Text(" ");
        })
        .Pageable(p => p.PageSizes(true).Input(true))
        .Sortable()
        .Filterable(fr => fr.Mode(GridFilterMode.Row))
        .Resizable(resize => resize.Columns(true))
        .Scrollable()
        .Excel(ex => ex.AllPages(true))
        .Editable(e => e.Mode(GridEditMode.InLine))
        .DataSource(dataSource => dataSource
        .Ajax()
        .GroupPaging(true)
        .PageSize(50)
        .Read("GetTasks", "Task")
        .Create("NewTask", "Task")
        .Update("EditTask", "Task")
        .Destroy("DeleteTask", "Task")
        .PageSize(20)
        .Model(model =>
        {
            model.Id(p => p.Id);
            model.Field(p => p.Status).Editable(false);
            
        })

        )
        )
</div>
<script>
    function forgeryToken() {
        return kendo.antiForgeryTokens();
    }
    
    function changestatus(e) {
        var dataItem = this.dataItem($(e.currentTarget).closest("tr"));

        $.ajax({
            type: "POST",
            url: '@Url.Action("ChangeTaskStatus", "Task")',
            datatype: "json",
            traditional: true,
            data: { Id: dataItem.Id },
            success: function (data) {
                if (data.success == true) {
                    var grid = $("#grid").data("kendoGrid");
                    grid.dataSource.read();
                    alert(data.message);
                }
            },
            error: function (data) {
                alert(data.message);
                console.log(error);
            }

        });
    }
    function getCommandIcon(e) {
        var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
        var status = dataItem.Status;
        console.log(status);
        if (status === "1") {
            return "k-icon k-i-stop";
        } else {
            return "k-icon k-i-play";
        }
    }

</script>
Anton Mironov
Telerik team
 answered on 07 Dec 2023
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
Date/Time Pickers
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)
SPA
Filter
Drawing API
Drawer (Mobile)
Globalization
Gauges
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
OrgChart
TextBox
Effects
Accessibility
ScrollView
PivotGridV2
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Collapsible
Localization
MultiViewCalendar
Touch
Breadcrumb
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
Popover
DockManager
FloatingActionButton
TaskBoard
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
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?