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

I have a grid with popup editing. The grid is using a custom editor. The grid has the mobile attribute set.

When adding a record on a mobile(ipad) the editor is showing the hidden fields that accompany the kendo components. See Screen prints

 

 

Anton Mironov
Telerik team
 answered on 02 Mar 2023
1 answer
436 views

I need and older version of UI  for ASP.NET MVC, more exactly 2021.3.1207 which does not have so many changes on widgets and is compatible with jQuery 3.6.0.

I need trial version just to see if I can upgrade from 2017 version and jQuery from 1.10.2 without much effort and rewriting code.

Thanks

Eyup
Telerik team
 answered on 28 Feb 2023
2 answers
175 views

Hello,

I need help for the following issue:

this is the dropdown list -

                @Html.Kendo().DropDownListFor(m => m.PoLine[nr].ActivityId).DataTextField("Value").DataValueField("Key").DataSource(source =>
           {
               source.Read(read =>
               {
                   read.Action(@MVC.Budget.Budget.ActionNames.GetActivity, MVC.Budget.Name)
                       .Type(HttpVerbs.Post)
                       .Data("function () { return filterSubCategory('" + categoryId.Replace("\\", "\\\\") + "','" + subCategoryId.Replace("\\", "\\\\") + "'," + @current.ActivityId + "," + @nr + "); }");
               })
               .ServerFiltering(true);
           }).Enable(true).AutoBind(false).CascadeFrom(subCategoryId).Events(ev => { ev.Change("function(e){ var item = this.dataItem(); return true; return onchangeDivFromItemText(item,'" + string.Format(idReplace, "activity") + "')}"); }).HtmlAttributes(new { @class = "combo_date", style = "width:170px;" })

and this is the field where I want to be updated - 

@Html.UbiLabelValues(Model.RefMarketList.Where(item => item.Key.HasValue && item.Key.Value == Model.PoLine[nr].MarketId).FirstOrDefault().Value, LabelFor: "MarketName", className: "MarketName")

where UbiLabelValues returns - 

            string s = "<label for='{1}' {1} >{0}</label>";
            s = string.Format(s, text, LabelFor, className);
            return new MvcHtmlString(s);

I want to know how to change ev.Change of dropdown in order to referentiate the field with the new value selcted from dropdown.

Sorin
Top achievements
Rank 1
Iron
 answered on 27 Feb 2023
1 answer
155 views

Hello,

I need to implement hierarchical data grid where the relationship between parent-child records is two fields. Can you provide an example of how to establish the relationship in the grid using multiple key fields, please?

Thank you.

Patrick

Anton Mironov
Telerik team
 answered on 22 Feb 2023
1 answer
125 views

Hi there!


I would like to customize the header of GanttChart timeline, like 

if it is WeekView,  "2023/2" in 1st line and "1" , "8" (← it will be the first day of week) in 2nd line  or

if it is MonthlyView, "2023/Q1" in 1st line and "2", "3" (← it will be the month number like "2" means Feburay) in 2nd line.

let me know how should I customize to that.

I think that I should use "Views.MonthView.MonthHeaderTemplate" function, but I have no idea how I used it.

I found this API from this following link, but I can't get detail info because it had died.

ASP.NET MVC Gantt - API Reference - Telerik UI for ASP.NET MVC

Could you please share me if there is any link in which explaination for gantt API info, how to use or which parameter should be passed.

Eyup
Telerik team
 answered on 20 Feb 2023
1 answer
263 views
 
In MVC application I am using Kendo column charts and I have the data as below.
TypePercentageDateColor
A25.52/12#2456C7
B702/13#2456C8
B502/14#2456C8
B55.52/15#2456C8
A60.32/13#2456C8

I want to create a column chart with this data, chart should be categorized by Date and there should be multiple columns depending on the type.

I wrote the below code snippet but it isn't working, cannot see the data on UI.

 @(Html.Kendo().Chart<EntitiesA.Report>
                ()
                .Name("Report")
                .Title("ReportA")
                .Legend(legend => legend
                .Position(ChartLegendPosition.Top)
                )
                .DataSource(dataSource => dataSource
                    .Read(read => read.Action("MethodReport", "ReportController"))
                    .Group(group => group.Add(model => model.Type))
                    .Sort(sort => sort.Add(model => model.Date).Ascending())
                )
                .Series(series =>
                {
                    series.Column(model => model.Percentage)
                        .Name("#= group.value # (Percentage)").CategoryField("Date").ColorField("Color");
                })
                .Legend(legend => legend
                    .Position(ChartLegendPosition.Bottom)
                )
                .CategoryAxis(axis => axis
                    .Labels(labels => labels.Format("MM/DD"))
                )
                .ValueAxis(axis => axis.Numeric()
                                .Labels(labels => labels.Format("{0:N0}"))
                                .MajorUnit(20)
                                .Max(100)
                                .Line(line => line.Visible(false))
                )
                .Tooltip(tooltip => tooltip
                .Visible(true)
                .Format("{0:N0}")
                )
                ) 

I don't see any data in the graph it is blank how to fix it, am I missing any logic or piece of code.

Eyup
Telerik team
 answered on 20 Feb 2023
2 answers
144 views

Hi,

How to pass antiForgeryToken in MVC Kendo form

Karina
Telerik team
 answered on 16 Feb 2023
0 answers
162 views

Client Template logic:

Working syntax:

columns.Template(@<text></text>).Title("Source").ClientTemplate("<a class='clslnkSome' data-healtharticleheading =#=HealthArticleHeading#>LINK</a>").Width(150);

Error giving syntax:

columns.Template(@<text></text>).Title("Source1").ClientTemplate("<div>#= (HealthArticleSource == null) ? 'N/A' : HealthArticleSource #</div><div>#= (HealthArticleAuthor == null && HealthArticleSource =='GuidingCare') ? 'N/A' :(HealthArticleSource !='GuidingCare')?'<a class=\\'clslnkSome\\' data-healtharticleheading =#=HealthArticleHeading# >LINK</>' : HealthArticleAuthor #</div>").Width(150);

Error:

Uncaught Error: Invalid template:'<tr class="k-master-row" data-uid="#=data.uid#" role='row'><td class="#= data && data.dirty && data.dirtyFields && data.dirtyFields['HealthArticleHeading'] ? ' k-dirty-cell' : '' #" role='gridcell'>#= data && data.dirty && data.dirtyFields && data.dirtyFields['HealthArticleHeading'] ? '<span class="k-dirty"></span>' : '' ##= (HealthArticleHeading == null) ? 'N/A' : HealthArticleHeading #</td><td class="#= data && data.dirty && data.dirtyFields && data.dirtyFields['HealthShortDesc'] ? ' k-dirty-cell' : '' #" role='gridcell'>#= data && data.dirty && data.dirtyFields && data.dirtyFields['HealthShortDesc'] ? '<span class="k-dirty"></span>' : '' ##=articleDescription(HealthShortDesc,HealthArticleHeading)#</td><td  role='gridcell'><a class='clslnkSome' data-healtharticleheading =#=HealthArticleHeading#>LINK</a></td><td  role='gridcell'><div>#= (HealthArticleSource == null) ? 'N/A' : HealthArticleSource #</div><div>#= (HealthArticleAuthor == null && HealthArticleSource =='GuidingCare') ? 'N/A' :(HealthArticleSource !='GuidingCare')?'<a class=\'clslnkSome\' data-healtharticleheading =#=HealthArticleHeading# >LINK</>' : HealthArticleAuthor #</div></td><td class="#= data && data.dirty && data.dirtyFields && data.dirtyFields['HealthArticleTypeName'] ? ' k-dirty-cell' : '' #" role='gridcell'>#= data && data.dirty && data.dirtyFields && data.dirtyFields['HealthArticleTypeName'] ? '<span class="k-dirty"></span>' : '' #<div id='ArticleTypeToolTip' style='width:100%;height:100%;cursor:pointer;display: flex; align-items: center;' title='<span style=font-weight:bold;text-align:center;>Readability Details</span><div style=text-align:left;>ReadabilityLevel =#= (ReadabilityLevel==''||ReadabilityLevel==null||ReadabilityLevel=='Undefined') ? 'N/A' : ReadabilityLevel#</div>' class='hOverHealthArticleTypeCls'>#= (HealthArticleTypeName==null)? 'N/A': HealthArticleTypeName #</div></td><td class="#= data && data.dirty && data.dirtyFields && data.dirtyFields['HealthArticleDate'] ? ' k-dirty-cell' : '' #" role='gridcell'>#= data && data.dirty && data.dirtyFields && data.dirtyFields['HealthArticleDate'] ? '<span class="k-dirty"></span>' : '' ##= (HealthArticleDate == ''||HealthArticleDate==null) ? 'N/A' : kendo.toString(HealthArticleDate, 'MM/dd/yyyy hh:mm:ss tt')#</td><td class="#= data && data.dirty && data.dirtyFields && data.dirtyFields['Status'] ? ' k-dirty-cell' : '' #" role='gridcell'>#= data && data.dirty && data.dirtyFields && data.dirtyFields['Status'] ? '<span class="k-dirty"></span>' : '' #<div class='status#:Status#'>#=Status#</div></td><td style="display:none"class="#= data && data.dirty && data.dirtyFields && data.dirtyFields['ExteranlHealthArticleId'] ? ' k-dirty-cell' : '' #" role='gridcell'>#= data && data.dirty && data.dirtyFields && data.dirtyFields['ExteranlHealthArticleId'] ? '<span class="k-dirty"></span>' : '' ##:data.ExteranlHealthArticleId==null?'':data.ExteranlHealthArticleId#</td><td  role='gridcell'><a style="#=((DeleteFlag == true)||(item && item.length > 0 && item[0].IsAdd == false && HealthArticleSource !='GuidingCare'))? 'pointer-events: none; opacity: 0.5;':'' #" class='icon-action-button-regular clslnkResend' id='lnkResend' data-healtharticleid='#=HealthArticleId#' data-healtharticleheading ='#=HealthArticleHeading#' data-healtharticletext='#:HealthArticleText#' data-healthfile='#=HealthFile#' data-filedocumentguid='#=FileDocumentGuid#'><span class='f18 ItemPR5'><i class='far fa-reply-all fa-flip-horizontal'></i></span></a> </td><td  role='gridcell'> <a style="#=(HealthFile == null || HealthFile == '') ? 'pointer-events: none; opacity: 0.5;':''#" class='icon-action-button-regular' target="_blank" onclick ="CallAtcmntNewWindow(this);"><span class='f18 ItemPR5'><i class='far fa-download'></i> </span></a><input type='hidden' value='/download.ashx?Article=#=HealthFile#&DocumentGuid=#=FileDocumentGuid#' /></td></tr>' Generated code:'var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;with(data){$kendoOutput='<tr class="k-master-row" data-uid="'+(data.uid)+'" role=\'row\'><td class="'+( data && data.dirty && data.dirtyFields && data.dirtyFields['HealthArticleHeading'] ? ' k-dirty-cell' : '' )+'" role=\'gridcell\'>'+( data && data.dirty && data.dirtyFields && data.dirtyFields['HealthArticleHeading'] ? '<span class="k-dirty"></span>' : '' )+''+( (HealthArticleHeading == null) ? 'N/A' : HealthArticleHeading )+'</td><td class="'+( data && data.dirty && data.dirtyFields && data.dirtyFields['HealthShortDesc'] ? ' k-dirty-cell' : '' )+'" role=\'gridcell\'>'+( data && data.dirty && data.dirtyFields && data.dirtyFields['HealthShortDesc'] ? '<span class="k-dirty"></span>' : '' )+''+(articleDescription(HealthShortDesc,HealthArticleHeading))+'</td><td  role=\'gridcell\'><a class=\'clslnkSome\' data-healtharticleheading ='+(HealthArticleHeading)+'>LINK</a></td><td  role=\'gridcell\'><div>'+( (HealthArticleSource == null) ? 'N/A' : HealthArticleSource )+'</div><div>'+( (HealthArticleAuthor == null && HealthArticleSource =='GuidingCare') ? 'N/A' :(HealthArticleSource !='GuidingCare')?'<a class=\'clslnkSome\' data-healtharticleheading =)+'=HealthArticleHeading'; >LINK</>' : HealthArticleAuthor ;$kendoOutput+='</div></td><td class="'+( data && data.dirty && data.dirtyFields && data.dirtyFields['HealthArticleTypeName'] ? ' k-dirty-cell' : '' )+'" role=\'gridcell\'>'+( data && data.dirty && data.dirtyFields && data.dirtyFields['HealthArticleTypeName'] ? '<span class="k-dirty"></span>' : '' )+'<div id=\'ArticleTypeToolTip\' style=\'width:100%;height:100%;cursor:pointer;display: flex; align-items: center;\' title=\'<span style=font-weight:bold;text-align:center;>Readability Details</span><div style=text-align:left;>ReadabilityLevel ='+( (ReadabilityLevel==''||ReadabilityLevel==null||ReadabilityLevel=='Undefined') ? 'N/A' : ReadabilityLevel)+'</div>\' class=\'hOverHealthArticleTypeCls\'>'+( (HealthArticleTypeName==null)? 'N/A': HealthArticleTypeName )+'</div></td><td class="'+( data && data.dirty && data.dirtyFields && data.dirtyFields['HealthArticleDate'] ? ' k-dirty-cell' : '' )+'" role=\'gridcell\'>'+( data && data.dirty && data.dirtyFields && data.dirtyFields['HealthArticleDate'] ? '<span class="k-dirty"></span>' : '' )+''+( (HealthArticleDate == ''||HealthArticleDate==null) ? 'N/A' : kendo.toString(HealthArticleDate, 'MM/dd/yyyy hh:mm:ss tt'))+'</td><td class="'+( data && data.dirty && data.dirtyFields && data.dirtyFields['Status'] ? ' k-dirty-cell' : '' )+'" role=\'gridcell\'>'+( data && data.dirty && data.dirtyFields && data.dirtyFields['Status'] ? '<span class="k-dirty"></span>' : '' )+'<div class=\'status'+$kendoHtmlEncode(Status)+'\'>'+(Status)+'</div></td><td style="display:none"class="'+( data && data.dirty && data.dirtyFields && data.dirtyFields['ExteranlHealthArticleId'] ? ' k-dirty-cell' : '' )+'" role=\'gridcell\'>'+( data && data.dirty && data.dirtyFields && data.dirtyFields['ExteranlHealthArticleId'] ? '<span class="k-dirty"></span>' : '' )+''+$kendoHtmlEncode(data.ExteranlHealthArticleId==null?'':data.ExteranlHealthArticleId)+'</td><td  role=\'gridcell\'><a style="'+(((DeleteFlag == true)||(item && item.length > 0 && item[0].IsAdd == false && HealthArticleSource !='GuidingCare'))? 'pointer-events: none; opacity: 0.5;':'' )+'" class=\'icon-action-button-regular clslnkResend\' id=\'lnkResend\' data-healtharticleid=\''+(HealthArticleId)+'\' data-healtharticleheading =\''+(HealthArticleHeading)+'\' data-healtharticletext=\''+$kendoHtmlEncode(HealthArticleText)+'\' data-healthfile=\''+(HealthFile)+'\' data-filedocumentguid=\''+(FileDocumentGuid)+'\'><span class=\'f18 ItemPR5\'><i class=\'far fa-reply-all fa-flip-horizontal\'></i></span></a> </td><td  role=\'gridcell\'> <a style="'+((HealthFile == null || HealthFile == '') ? 'pointer-events: none; opacity: 0.5;':'')+'" class=\'icon-action-button-regular\' target="_blank" onclick ="CallAtcmntNewWindow(this);"><span class=\'f18 ItemPR5\'><i class=\'far fa-download\'></i> </span></a><input type=\'hidden\' value=\'/download.ashx?Article='+(HealthFile)+'&DocumentGuid='+(FileDocumentGuid)+'\' /></td></tr>';}return $kendoOutput;'
    at Object.compile (kendo.all.js:238:31)
    at Object.d [as template] (jquery.min.js?v=20221123162512:2:3873)
    at init._tmpl (kendo.all.js:70999:37)
    at init._templates (kendo.all.js:71153:45)
    at init._continueInit (kendo.all.js:65634:22)
    at new init (kendo.all.js:65621:26)
    at HTMLDivElement.<anonymous> (kendo.all.js:2520:36)
    at Function.each (jquery.min.js?v=20221123162512:2:2898)
    at n.fn.init.each (jquery.min.js?v=20221123162512:2:846)
    at e.fn.<computed> [as kendoGrid] (kendo.all.js:2519:30)
compile @ kendo.all.js:238
d @ jquery.min.js?v=20221123162512:2
_tmpl @ kendo.all.js:70999
_templates @ kendo.all.js:71153
_continueInit @ kendo.all.js:65634
init @ kendo.all.js:65621
(anonymous) @ kendo.all.js:2520
each @ jquery.min.js?v=20221123162512:2
each @ jquery.min.js?v=20221123162512:2
e.fn.<computed> @ kendo.all.js:2519
eval @ VM5042:2
n @ kendo.aspnetmvc.js:900
eval @ VM5042:2
(anonymous) @ jquery.min.js?v=20221123162512:2
globalEval @ jquery.min.js?v=20221123162512:2
Ha @ jquery.min.js?v=20221123162512:3
append @ jquery.min.js?v=20221123162512:3
(anonymous) @ jquery.min.js?v=20221123162512:3
Y @ jquery.min.js?v=20221123162512:3
html @ jquery.min.js?v=20221123162512:3
(anonymous) @ jquery.min.js?v=20221123162512:4
i @ jquery.min.js?v=20221123162512:2
fireWith @ jquery.min.js?v=20221123162512:2
y @ jquery.min.js?v=20221123162512:4
c @ jquery.min.js?v=20221123162512:4
XMLHttpRequest.send (async)
send @ jquery.min.js?v=20221123162512:4
ajax @ jquery.min.js?v=20221123162512:4
n.fn.load @ jquery.min.js?v=20221123162512:4
eval @ VM5030:20
i @ jquery.min.js?v=20221123162512:2
add @ jquery.min.js?v=20221123162512:2
n.fn.ready @ jquery.min.js?v=20221123162512:2
eval @ VM5030:2
(anonymous) @ jquery.min.js?v=20221123162512:2
globalEval @ jquery.min.js?v=20221123162512:2
Ha @ jquery.min.js?v=20221123162512:3
append @ jquery.min.js?v=20221123162512:3
(anonymous) @ jquery.min.js?v=20221123162512:3
Y @ jquery.min.js?v=20221123162512:3
html @ jquery.min.js?v=20221123162512:3
(anonymous) @ jquery.min.js?v=20221123162512:4
i @ jquery.min.js?v=20221123162512:2
fireWith @ jquery.min.js?v=20221123162512:2
y @ jquery.min.js?v=20221123162512:4
c @ jquery.min.js?v=20221123162512:4
XMLHttpRequest.send (async)
send @ jquery.min.js?v=20221123162512:4
ajax @ jquery.min.js?v=20221123162512:4
n.fn.load @ jquery.min.js?v=20221123162512:4
eval @ VM4781:366
dispatch @ jquery.min.js?v=20221123162512:3
r.handle @ jquery.min.js?v=20221123162512:3
Tarun
Top achievements
Rank 1
 asked on 14 Feb 2023
14 answers
447 views

When the scheduler has an event that starts at the cuttoff time for your scheduler-table, the entire table shifts up 16px to accommodate (show) that there is in fact an event there, however  the div with class="k-scheduler-times" is not shifted.

For example, my scheduler is setup for 00:00 to 24:00.  If I have an event that is starting at 24:00, my table looks perfect until I scroll down to the bottom and the 23:00 - 24:00 time slot becomes visible. Once it is on-screen, the events table all move up by 16px and the grids no longer line up with the scheduler-times. 

Please provide a fix, that when this is triggered, to also inlcude the "k-Scheduler-times" to be shifted up in sync with the scheduler-table.

See attached photos.

Thank you,

Rob

Peter
Top achievements
Rank 1
Iron
 answered on 13 Feb 2023
2 answers
468 views

Can I please get an example of how to use the multi-filter option (.Filterable(f => f.Multi(true))) when the column is using a ClientTemplate.

 

WIth the code below I get [Object] [Object] in the column filter drop down. The client template is parse out an array of hyperlinks from the model.

 

 

columns.Bound(e => e.Reports).Title("Open <br />Reports").Filterable(f => f.Multi(true)).Width(120).ClientTemplate("#=openReport(Reports)#");

 

   function openReports(Reports) {
        if (Reports && Reports.length > 0) {
            var result = "";
            var j = Reports.length;
            for (var i = 0; i < j; i++) {
                result += "<a href='" +
                    someServer +
                    "webpage.aspx?someNumber=" +
                     Reports[i].Number +
                    "&Revision=" +
                    Reports[i].Revision +
                    "' target ='_blank'>" +
                    + Reports[i].Number +
                    "-" +
                    Reports[i].Revision +
                    "</a>, ";
            }
            return result.substring(0, result.length - 2);
        } else {
            return "";
        }

    }

Karina
Telerik team
 answered on 10 Feb 2023
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
MediaPlayer
TileLayout
DateInput
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
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?