Telerik Forums
UI for ASP.NET MVC Forum
2 answers
140 views

I have a page that has a pie chart and a grid. Both controls use the same data. I could create a data source for each control and have it call the service twice, but that seems inefficient. Is there a way to define the data source for the chart and handle an event when the data is returned and assign the data to the grid's data source?

Which event should be handled?

What's the command to assign the data to the grid's data source?

Thanks

Tim
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 28 Jul 2022
2 answers
267 views

I'm trying to add drag and drop functionality on my Grid. I have followed the documentation here, https://demos.telerik.com/aspnet-mvc/grid/drag-drop. However, I'm getting an gridreorderingsettingsbuilder does not contain a definition for 'Rows'. I'm also getting another error on .Draggable.  I'm using version 2021.1.224.545. Do I need to update my version? 

            @(Html.Kendo().Grid<AHPD.Data.Model.Questions>()
                .Name("grdSubs")
                .Columns(columns =>
                {
                    columns.Template(@<text> </text>).Draggable(true);
                    columns.Bound(p => p.Disabled).ClientTemplate("<div style='text-align: center;'>" +
                                                                        "# if(Disabled == '0'){ #" +
                                                                        "<div><input type='checkbox' disabled style='opacity: 1;' ><label></label></div>" +
                                                                        "# } else { #" +
                                                                        "<div><input type='checkbox' disabled checked style='opacity: 1;' ><label></label></div>" +
                                                                        "# } #" +
                                                                        "</div>").Title("Off").Width(80);
                    columns.Bound(p => p.Question).Title("Question");
                    columns.Bound(p => p.QuestionId).Title("Edit").Width(80).ClientTemplate("<div style='text-align: center;'onclick=\"edit(event)\"><img src='" + Url.Content("~/Content/aert/images/edit.png") + "' style='width: 20px; height: 20px;' /></div>");
                    columns.Bound(p => p.Status).Title("Status").Width(150);
                })
                    .Sortable()
                    .Pageable()
                    .ClientDetailTemplateId("subs")
                    .Navigatable()
                    .Reorderable(reorder => reorder.Rows(true))
                    //.HtmlAttributes(new { style = "min-height:600px;" })
                    .DataSource(dataSource => dataSource
                        .Ajax()
                        .PageSize(50)
                        .Read(read => read.Action("GetQuestionsList", "Owner"))
                        .Model(model =>
                        {
                            model.Id(p => p.QuestionId);
                            model.Field(p => p.Question).Editable(false);
                            model.Field(p => p.Status).Editable(false);
                        })
                    )
                    .Events(events => events.DataBound("dataBound"))
            )


Joshua
Top achievements
Rank 1
Iron
 answered on 27 Jul 2022
3 answers
2.6K+ views
How can I return a Custom error for a Grid Operation.

E.g.: If the database delete is not possible show a popup that something is gone wrong.

Controller Method:
[HttpPost]
public ActionResult DestroyEmploymentStatus([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]List<EmploymentStatusViewModel> employmentStatuses)
{
    if (employmentStatuses.Any())
    {
        foreach (var esvm in employmentStatuses)
        {
            var es = db.EmploymentStatuses.Find(esvm.Id);
 
            db.EmploymentStatuses.Remove(es);
            db.SaveChanges();
        }
    }
 
    return Json(employmentStatuses.ToDataSourceResult(request, ModelState));
}

regards
Ivan Danchev
Telerik team
 updated answer on 26 Jul 2022
0 answers
389 views

Hi,

i'm trying to use Kendo Upload to upload a file, using the selection or drag&drop, with file name length over 260 characters but the result of upload operation change the file name.

For example:

C:\Espropri e Patrimonio\Patrimonio\Tutela 2022\AAAAA\FASCIA DI RISPETTO\BENESTARE\CARTACEO-INFORMATICO\VAILOG (Conferenza Servizi AAAAA Italia Transport)\DOCUMENTAZIONE INFORMATICA-CARTACEA\RIPRISTINO\13.05.2022 Prot. ent. AAAAA (progetto)\Document timestamp signed.pdf.tsd.p7m

The file name change into "DOCUME~1.P7M".

I've reproduce the problem also with the demo at https://demos.telerik.com/kendo-ui/upload/initialfiles.

Is there a way to solve the problem?

Cchecking the API I do not see that the property "name" but also in this case the name of the file is "DOCUME ~ 1.P7M"

https://docs.telerik.com/kendo-ui/api/javascript/ui/upload/configuration/files#files.name

 

Many thanks

Stefano

stefano
Top achievements
Rank 1
 asked on 26 Jul 2022
0 answers
111 views

There's something going on with this datetime picker.

Please see screenshots below. 

The item.DEFAULT_VALUE below has a value, not null.

But in the script below, the "value=" field is missing.

While others have "value=" field.

What's going on here?

My kendo UI version for ASP.NET MVC is 2022.2.621

Cedric Vincent
Top achievements
Rank 1
 asked on 26 Jul 2022
1 answer
122 views

A while ago I created a kendo.custom.min.js file for a project with the custom download builder. Unfortunately I did not make note of the options that were checked. Now I want to add a few Telerik controls to the project and create a new custom download file. Is there any easy to work backwards from a custom download file to find all of the options it contains?

Thanks

Petar
Telerik team
 answered on 25 Jul 2022
1 answer
149 views
Hello Guys,

I have a grid with a start and end date and would like to select several start date cells and make an adjustment in the top selected start date cell and then all selected cells should be overwritten.

https://demos.telerik.com/aspnet-mvc/grid/selection

Thanks in advance!
Yanislav
Telerik team
 answered on 25 Jul 2022
0 answers
108 views

I have an existing dropdownlist which gets its data via ajax from api.

Now, I want to add an item "Add New" (just under the existing optionlabel) , which when clicked will open a kendo window.

Questions:

1. First of all, is there any easy/direct way to do this?

2. One option that I could think of - and I am trying to get that working - is to add an item after the initial ajax data is loaded, and use onSelect to check if the option selected is "Add New" and open a window

However, I am not able to implement this. I am stuck at trying to add an additional item to the existing options (which as I mentioned is retrieved via ajax). How to do this? Please note that I already have a optionlabel which I want to retain (based on clients insistence).

 

Any idea how to achieve this?

 

PS: i cannot add this from server side api as that code is not in my control.

 

Azhar
Top achievements
Rank 1
Iron
 asked on 22 Jul 2022
1 answer
1.1K+ views

We have a Kendo grid that can display anywhere from 10 to thousands of rows.  We want to be able to set the grid page size to several values, including ALL.

What we have now - without ALL works:

.Pageable(p => p
     .PageSizes(new[] { 100, 200, 500, 1000, 2000 })

When we run this - we see the correct values in the "Items per page" dropdown.

We want to add the "All" option to this dropdown, but the following is not working (compile error)
.Pageable(p => p
     .PageSizes(new[] { 100, 200, 500, 1000, 2000, "All" })

How do we include All along with other values in the Items per page?

 

Eyup
Telerik team
 answered on 20 Jul 2022
26 answers
977 views
Hi Guys!

I'm curious why the Telerik upgrade project wizard is so very slow every time i upgrade an ASP.NET MVC 4 project. I can see each of the files copied in status bar with a what seems like a forced delay in between each file. The whole process takes more than 10+ minutes and in the meantime the drive activity is very low.
All other operations with 100 times more files on my SSD machine are very fast and finish in matters of seconds like it is with creating new Kendo UI ASP.NET MVC 4 project.
Just for the existing project the upgrade operation is very very slow and i wonder if you guys can shed some light on the matter.

Cheers!
Nikolay Mishev
Telerik team
 answered on 20 Jul 2022
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
DateTimePicker
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
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
AICodingAssistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?