Telerik Forums
UI for ASP.NET MVC Forum
1 answer
42 views

Here is the grid before I click the first Edit button:

And then after:



Most of the rows have disappeared.
The h-scrollbar is gone.  Typically I can't scroll right. Seems a few cases, playing around with it, the arrow-keys scrolled right but the header row became detached, i.e. did not scroll right with the body. 

Anyone know what might be causing this?  I"ve been getting this problem on 2024 Q4 and 2025 Q1. 

I have enabled fairly strict CSP headers per management requirements and am using at least 3 editor templates. I've added this line:
@(Html.Kendo().DeferredScriptFile(nonce))
to the bottom of each EditorTemplate file (not sure if that's correct).  Removing that line seems to fix the grid-distortion but also loses the editor template itself. 

 

 

 

Anton Mironov
Telerik team
 answered on 20 Feb 2025
1 answer
106 views

I'm looking to implement a check when a user has scrolled to the bottom of the pdfviewer using dotnet mvc/jquery.

Iv found the following articles 

https://docs.telerik.com/devtools/wpf/knowledge-base/kb-pdfviewer-scroll-to-last-page

https://www.telerik.com/forums/how-to-access-scroller-of-pdfviewer

 

and iv managed to hook into the scroll functionality through a private scroller field like so

still figuring out the calculation...

<script>
      function onPdfViewerComplete(e){
        debugger;
        try {
                const scroller = e.sender._scroller;
                const scrollPosition = scroller.scrollTop;
                const maxScrollPosition = scroller.scrollHeight - scroller.clientHeight;

            scroller.bind('scroll', ()=> {
                if (scrollPosition >= maxScrollPosition) {
                    alert("Scrolled to the bottom of the PDF");
                }
            });
        } catch(e) {
            console.error("error", e);
        }
    }
</script>


Is there any better way to handle this? the documentation seems sparse around this.
Mihaela
Telerik team
 answered on 13 Feb 2025
1 answer
88 views

am using Kendo UI with Razor as the frontend and .NET Framework 4.8.1 as the backend.
I have the following code, but it does not initially display "Switzerland".
It is present in the list, but I do not want to select it manually.
I want it to be preselected from the start. Could you please help me?


@model int?

@{
    var initialItems = new List<SelectListItem>()
{
        new SelectListItem{ Text = "Schweiz", Value = "1" }
    };
}

<div class="k-floating-label-container mb-3">
    @(Html.Kendo().DropDownListFor(x => x)
        .DataTextField("Text")
        .DataValueField("Value")
        .AutoBind(false)
        .BindTo(initialItems)
        .Value(Model?.ToString())
        .Events(e => e.Open("onDropDownOpen"))
        .Deferred()
    )
    @Html.LabelFor(x => x, new { @class = "k-label k-input-label" })
    @Html.ValidationMessageFor(x => x)
</div>

<script>function onDropDownOpen(e) {
    var dropdown = $("#Store_DefaultLanguageId").data("kendoDropDownList");

    if (dropdown.dataSource.total() === 1) { 
        dropdown.setDataSource(new kendo.data.DataSource({
            transport: {
                read: {
                    url: "/Language/LanguageList",
                    dataType: "json",
                }
            },
            serverFiltering: true
        }));
    }
}
</script>

Anton Mironov
Telerik team
 answered on 07 Feb 2025
1 answer
88 views

I'm using the Kendo for ASP.Net MVC Upload control. I'm on version 2019, and upgrading right now is not an option unfortunately. When the user chooses a file (multi-select is off), I have a Submit button separate from the control that the user clicks to begin the upload. While the upload is taking place, I want the Choose File button to be disabled. I need the pause and cancel buttons enabled, so it won't work to disable the entire control. I have a place to put some javascript to disable the button, but everything I've tried so far doesn't accomplish disabling the button. 

Here is the declaration of the control:

                        <div id="uploadControlContainer" class="upload-input col-sm-12">
                            @(Html.Kendo().Upload()
                                .Name("chunkContent")
                                .Async(a => a
                                    .Batch(false)
                                    .Save("UploadLargeFileChunk", "DocumentUpload")
                                    //.Remove("Remove", "DocumentUpload") not implemented
                                    .AutoUpload(false)
                                    .ChunkSize(Model.ChunkSize)
                                    .AutoRetryAfter(Model.AutoRetryAfter)
                                    .MaxAutoRetries(Model.MaxAutoRetries)
                                )
                                .Multiple(false)
                                .Events(e => e.Select("onSelectFile"))
                                .Events(e => e.Upload("onUploadChunk"))
                                .Events(e => e.Cancel("onCancelUpload"))
                                .Events(e => e.Success("onUploadSuccess"))
                                .Events(e => e.Error("onUploadError"))
                                .Messages(m => m.Select("Choose File"))
                            )
                        </div>

 

Mihaela
Telerik team
 answered on 06 Feb 2025
1 answer
157 views

Hi,

I have have a requirement, where I need to upload an excel file. After uploading the excel file when the user clicks Import button then all the excel data should add to the Kendo grid.

I am using .Net 8 with MVC Razor page to achieve this. Is there any library I have to use to read the excel data to kendo grid or the kendo grid 

have some API(s) which can read the excel file and update the grid.

This is my excel records. 

This is my application, when the user upload this above excel and click on import from Excel, then the above excel records should fill in the

kendo grid.

 

 

Eyup
Telerik team
 answered on 23 Jan 2025
0 answers
81 views

I am using autoFitColumn function on a Telerik UI for MVC grid to show the content of all cells as per the below article.

https://docs.telerik.com/aspnet-mvc/knowledge-base/grid-autofit-all-columns-width

This works if the grid's display is not none. However, there are three tabs on the page, each containing a grid. Only the opened grid has correct column widths. Other grids have minimum column widths. This is unless the user manually opens each tab quickly during data load.

I tried using Telerik's TabStrip at first, but the grid always has minimum column widths when using autoFitColumns, even on the first tab. The goal was to put a Grid inside each tab of the TabStrip. Currently, I am using custom built tabs. 

My current solution to this problem is to set the "hidden" style of each grid to:

position: absolute;
top: -9999px;
left: -9999px;

Is there a better solution?

ConcretePlusGrass
Top achievements
Rank 1
 asked on 10 Jan 2025
1 answer
129 views

I am using a Kendo.Filter object like the following to filter results in a Kendo Grid:

@(Html.Kendo().Filter<CustomPersonClass>() .Name("personFilter") .DataSource("peopleDS") .ApplyButton(false) .Fields(f => {

f.Add(p => p.LastName).Label("Last Name");
         f.Add(p => p.FirstName).Label("First Name");
         f.Add(p => p.MiddleName).Label("Middle Name");

f.Add(p => p.StartDate).Label("Start Date").Operators(o => o.Date(d => d.Eq("Is equal to").Gte("Greater than equal").Lte("Less than equal"))); }) )

 I have helper code to handle the toolbar in my Kendo Grid like the following, :

@helper ToolbarTemplate()
{
    <button class="k-button k-button-solid k-button-solid-base" id="applyFilter"><span class="k-icon k-i-filter"></span>Apply Filter</button>
    <button class="k-button k-button-solid k-button-solid-base" id="clearFilter">Reset</button>
    <button class="k-button k-grid-excel k-button-solid k-button-solid-base"><span class="k-icon k-i-excel"></span>Export to Excel</button>
}

I also have some JavaScript in a function to apply the filter when the Apply Filter button is clicked, as seen here:

$("#applyFilter").click(function (e) {
    //e.preventDefault();
    var myFilter = $("#personFilter").getKendoFilter();
    localStorage["kendo-person-filter-options"] = kendo.stringify(myFilter.getOptions().expression);
    myFilter.applyFilter();
});

 

The problem I am having is if I enter an invalid Leap Year date (e.g. 2/29/2003, since 2023 didn't have a February 29th), I get no data back; however, if I enter a valid Leap Year (e.g. 2/29/2004), my Kendo Grid will show data.  Is there a way to validate the date that is being entered manually into a DatePicker field used for filtering?  That is, if I use the DatePicker, it will not show me 2/29/2003 as an option, but if I type in 2/29/2003 and click Apply Filter, it doesn't throw any kind of error about 2/29/2003 being invalid.

Andy
Top achievements
Rank 1
Iron
 answered on 08 Jan 2025
1 answer
156 views

Hi,

we upgraded a project of ours from 2022.2.510 to 2024.4.1112, and expectedly our icons aren't working anymore, for example:

<i class="k-icon k-i-user"></i>

 

The following articles suggest, that it is possible to continue using font icons instead of svg icons:

But we weren't able to get it to work. Is this still supported, and do we need to do sth. else?

(Besides upgrading the project through NuGet, we also installed the packages for SVGIcons and FontIcons from Telerik...)

 

Kind regards.

Eyup
Telerik team
 answered on 21 Dec 2024
1 answer
64 views

I upgraded my application to 2024.4.1112 and now my fonts are small and some of my buttons are left justified instead of right justified.

I am including before and after pictures.

Can someone assist with this issue?

Thanks.

Eyup
Telerik team
 answered on 20 Dec 2024
1 answer
101 views

Hi,

I have a Kendo grid as below. On Click of a custom toolbar button(Edit) I want to enable all the rows of the grid.

1. When the user clicks on Edit button it should enable all the rows to edit mode.

2. The Edit button text should change to Update on click of Edit button.

3. Then user change the rows and select the checkbox, and click on the update button, then only the selected checked rows will send to server for update.

Please help me find the above requirements solutions.

 

Mihaela
Telerik team
 answered on 13 Dec 2024
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
AppBar
BottomNavigation
Card
FloatingActionButton
Licensing
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
DateTimePicker
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?