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

I am trying to preload deafult value that will always exist in this downdownlist no matter when. Then load in another list from the data base behind it base on other factors. See test code below.

 

 


@(Html.Kendo().DropDownList() .Name("groupTypeFilter") .HtmlAttributes(new { @class = "form-select", data_alpa = "filter", onchange = "ApplyFilter(this)" }) .OptionLabel("All") .DataTextField("Text") .DataValueField("Value") .BindTo(new List<SelectListItem> { new SelectListItem { Text = "All", Value = "all" }, new SelectListItem { Text = "All GMS Groups", Value = "allgms" }, new SelectListItem { Text = "All MECCOM Groups", Value = "allmeccom" } }) .DataSource(config => config.Read("GetGroupTypes", "Group")) )

 


 

public JsonResult GetGroupTypes() { var groupTypes = new List<SelectListItem> { new SelectListItem { Text = "All", Value = "ALL" }, new SelectListItem { Text = "GMS", Value = "GMS" }, new SelectListItem { Text = "MEC/COM", Value = "MEC/COM" } }; return Json(groupTypes); }

 

It seems to be only load the data from the data call and not the deafult data that I loaded into it



Eyup
Telerik team
 answered on 29 Sep 2025
1 answer
122 views
Hello everyone
i have to create some cypress tests and figured out that nested grid components like the header date time filters do not have any ids or data-role-ids.
is there a way to "enable" them? 
i can find components searching by Title (like  $(e.container).find('select[title="Operator"]'); or $(e.container).find('select[title="Additional operator"]');) but it's not 100% safe

Anton Mironov
Telerik team
 answered on 25 Sep 2025
0 answers
97 views

Hi,

I have a strict CSP implemented in the Program.cs file, after that when I verified the browser developer tool then I can see the get API is called 2 times.

Can you please let me know why this get API is called 2 times. 

When I analyze I found that Kendo Panelbar Select event is called twice so internally the Get API is called twice.

@(Html.Kendo().PanelBar()
        .Name("panelbar")
        .ExpandMode(PanelBarExpandMode.Multiple)
        .Events(ev => ev.Select("OnSelect_Panel"))
        .Items(panelbar =>
        {
          panelbar.Add().Text("Test Panel");
        })


function OnSelect_Panel(sender) {

}

Inside the OnSelect_Panel() method is calling twice so the GET API also called twice. How can I restrict to one API call.

Note: Without strict CSP OnSelect_Panel() is called once but with strict CSP it called twice.

 

abdul
Top achievements
Rank 2
Iron
Iron
Iron
 updated question on 19 Sep 2025
1 answer
91 views

I have two draggable grids, but the second has no drop point, just a circle with a line through it. Can you tell me why the second grid allows me to drag the row but no where to drop?

 

                        // QUESTIONS
                        tab.Add().Selected(true).Text("Questions").Content(@<text>
                        @(Html.Kendo().Grid<TemplateQuestionVM>()
                            .Name("AI_TemplateQuestionGrid")
                            .ToolBar(toolbar =>
                            {
                                if (Model.TemplateId != 0) toolbar.New("TemplateQuestionEdit", "Template Question", $"AI/TemplateQuestion/edit?parentId={Model.TemplateId}");
                                toolbar.SuperSearchWindow("TemplateEdit", "AI_TemplateQuestionGrid");
                            })
                            .Height(600)
                            .DataSource(dataSource => dataSource
                                .Ajax()
                                .Sort(s => s.Add("Sequence"))
                                .Read(read => read.Action("Read", "TemplateQuestion", new { parentId = Model.TemplateId }).SuperSearchWindow("TemplateEdit", "AI_TemplateQuestionGrid"))
                                .Model(m => m.Id(f => f.TemplateQuestionId))
                            )
                            .Columns(columns =>
                            {
                                columns.Bound(c => c.TemplateQuestionId).Width(1).Title("").Filterable(false);
                                columns.Bound(c => c.Sequence).Width(80).Title("Seq").Filterable(false);
                                columns.Template("").Draggable(true).Width(80);
                                columns.Bound(c => c.QuestionName).Title("Question").Filterable(false);
                                columns.Bound(c => c.TemplateQuestionId).Edit("TemplateQuestionEdit", "Template Question", "AI/TemplateQuestion/edit/#=TemplateQuestionId#");
                            })
                            .Filterable()
                            .Scrollable()
                            .Sortable()
                            .Reorderable(order => order.Rows(true))
                            .Events(ev => { ev.RowReorder("function(e) { dragRow(e, 'AI_TemplateQuestion', 'TemplateId', " + Model.TemplateId + "); }"); })
                        )</text>);

                        // VARIABLES
                        tab.Add().Selected(false).Text("Variables").Content(@<text>
                        @(Html.Kendo().Grid<TemplateVariableVM>()
                            .Name("AI_TemplateVariableGrid")
                            .ToolBar(toolbar =>
                            {
                                if (Model.TemplateId != 0) toolbar.New("TemplateVariableEdit", "Template Variable", $"AI/TemplateVariable/edit?parentId={Model.TemplateId}");
                                toolbar.SuperSearchWindow("TemplateEdit", "AI_TemplateVariableGrid");
                            })
                            .Height(600)
                            .DataSource(dataSource => dataSource
                                .Ajax()
                                .Sort(s => s.Add("Sequence"))
                                .Read(read => read.Action("Read", "TemplateVariable", new { parentId = Model.TemplateId }).SuperSearchWindow("TemplateEdit", "AI_TemplateVariableGrid"))
                                .Model(m => m.Id(f => f.TemplateVariableId))
                            )
                            .Columns(columns =>
                            {
                                columns.Bound(c => c.TemplateVariableId).Width(1).Title("").Filterable(false);
                                columns.Bound(c => c.Sequence).Width(80).Title("Seq").Filterable(false);
                                columns.Template("").Draggable(true).Width(80);
                                columns.Bound(c => c.VariableCode).Width(200).Title("Variable").Filterable(false);
                                columns.Bound(c => c.VariableName).Title("Name").Filterable(false);
                                columns.Bound(c => c.VariableType).Width(200).Title("Type").Filterable(false);
                                columns.Bound(c => c.TemplateVariableId).Edit("TemplateVariableEdit", "Template Variable", "AI/TemplateVariable/edit/#=TemplateVariableId#");
                            })
                            .Filterable()
                            .Scrollable()
                            .Sortable()
                            .Reorderable(order => order.Rows(true))
                            .Events(ev => { ev.RowReorder("function(e) { dragRow(e, 'AI_TemplateVariable', 'TemplateId', " + Model.TemplateId + "); }"); })
                        )</text>);
Anton Mironov
Telerik team
 answered on 18 Sep 2025
1 answer
114 views
Hi Team,

I want to show the sum of a decimal data type column at the bottom of child grid column in kendo ui mvc 4?
I am using below approach but always getting the sum as 0. Please guide on this.

.Columns(columns =>
   {
      //..
       columns.Bound(p => p.amount)
           .HeaderTemplate("Amount")
           .ClientFooterTemplate("Sum: \\#=sum\\# ");
      //..
   })
.DataSource(dataSource => dataSource
            .Ajax()
            .Aggregates(aggregates => {
                aggregates.Add(p => p.amount).Sum();
            })
            .Read(read => read.Action("Invoice_Read", "ProjectsInvoice", new { projectCode = "#=projectCode#" }))
        
             
        )
Eyup
Telerik team
 answered on 17 Sep 2025
2 answers
77 views

Hi,

My job is using the ANDI Accessibility Tool to test for accessibility and Section 508 compliance.

The tool keeps telling me that the, "Grid Element has no accessible name."  I have tried all of the suggestions listed in your online Grid Accessibility document.  However, I'm still getting the same message.

I also used the ANDI tool on your accessibility grid example and I received the same message.

Can someone assist me with this issue?

ANDI is a free Chrome Extension: https://chromewebstore.google.com/detail/unofficial-andi/fehcidpnbiemiekbbgligjlgjbhjchon.

I am including the results from my application and from your online demo grid.

Thanks,

Trena

Anton Mironov
Telerik team
 answered on 17 Sep 2025
1 answer
81 views

I am trying to call an external web api with the autocomplete but can't seem to pass the autocomplete value as I need to.  I need to pass the value at the end of the URL like:  https://webapiurl/api/{value} .  The farthest I got is passing the value but as a querystring parameter (https://webapiurl/api?name=value), this doesn't work, I get a 404 error.  How can I concatenate the value at the end of the URL?

 

@(Html.Kendo().AutoComplete().Name("auto")
    .DataTextField("Name")
    .Filter("contains")
    .MinLength(4)
    .DataSource(source =>
        {
            source.Read(r =>
            {
                r.Url("https://webapiurl/api")
                    .Data("onAdditionalData");
            })
            .ServerFiltering(false);
        })
    )

<script>
    function onAdditionalData() {
        return {
            name: $("#auto").val()
        };
    }
</script>

Ivaylo
Telerik team
 answered on 16 Sep 2025
1 answer
71 views
Hi Team,

I am using kendo date picker for in custom editor template for a kendo grid for pop up editing which is bind to datetime field of the model, now while displaying the value in the kendo date picker in custom editor template the value is displayed according to the user/client machine time zone which is changing the date value when the user is in some other time zone other than EST as application server is in EST , how to resolve the display issue in the kendo date picker for??
I am using the below code in custom editor template.
Please guide how to resolve this?


<div class="editor-field">
        @(Html.Kendo().DatePickeFor(m=>m.EndDate)
            .Format("MM/dd/yyyy")
            .Value(Model.EndDate)
           )
        @Html.ValidationMessageFor(m => m.EndDate)
</div>
Mihaela
Telerik team
 answered on 15 Sep 2025
2 answers
40 views
Is there a way to cancel item remove in the remove event handler? Something similar to preventDefault()
Anton Mironov
Telerik team
 answered on 11 Sep 2025
1 answer
50 views

Problem:
After enabling Content Security Policy (CSP), Kendo DropDownLists inside a PanelBar fail to initialize. On page load:
• The DropDownList renders as a plain input box.
• PanelBar items appear empty, and data binding does not happen.
• JavaScript access to the DDL fails.

Scenario:
• ASP.NET MVC Razor.
• Dropdown Lists inside PanelBar content templates.
• Worked fine before CSP; now initialization and binding fail.

 

Expected Behavior:
• DDL should initialize and bind data on content load even with CSP.
• PanelBar items should display properly.

 

Example:

@(
                     Html.Kendo().PanelBar()
                     .Name("panelbar")
                     .ExpandMode(PanelBarExpandMode.Multiple)
                     .Items(panelbar =>
                     {
                         panelbar.Add().Text("Note : Please fill all the input")
                         .Content(@<text>
        @(Html.Kendo().DropDownList()
                                            .Name("dropdown")
                                            .OptionLabel("Please Select")
                                            .OptionLabelTemplate("<span style='color:dimgrey;font-size:10px;font-weight:bold'>Please Select</span>")
                                            .DataValueField("id")
                                            .DataTextField("Text")
                                            .Template("#:id # - #:datacolumn # - #:datecolumn #")
.DataSource(source=>{source.Read(read=>{read.Action("action","controller");});})
.Events(e=>{e.Select("onselect");})
                                            )
   </text>
   );

 

Thanks,

Anupriya. R

Anton Mironov
Telerik team
 answered on 09 Sep 2025
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
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
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
DateInput
MediaPlayer
TileLayout
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?