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

I am attempting to write the onDrop event:

function onTreeDrop(e) {
        var treeview = $("#treeview").data("kendoTreeView");
        var p = e.dropPosition;
        
        sn = treeview.dataItem(e.sourceNode);
        dn = treeview.dataItem(e.destinationNode);
        psn = treeview.parent(e.sourceNode);
        pdn = treeview.parent(e.destinationNode);

        if (p == "over") {
            if (dn.IsDept) {
                treeview.append(sn, pdn);
            }
            else {
                treeview.append(sn, dn);
            }
            e.setValid(true);
        }
        else if (p == "before") {

        }
        else if (p == "after") {

        }
    }

 

when I do a drop over I get the following error:

 

kendo.all.js:78326 
Uncaught TypeError: t.children is not a function
    at kendo.all.js:78326
    at init.append (kendo.all.js:79643)
    at init.onTreeDrop (Index:497)
    at init.trigger (kendo.all.js:124)
    at Object.drop (kendo.all.js:78557)
    at init.dragend (kendo.all.js:78269)
    at init.i (jquery-1.10.2.min.js:21)
    at init.trigger (kendo.all.js:124)
    at init._trigger (kendo.all.js:23904)
    at init._end (kendo.all.js:23881)

when I follow the error to kendo.all.js:78326 the object has node.children. My own Model has a Children property. Perhaps the two "children" are conflicting?

 

 

Index:497 Unc
aught TypeError: t.children is not a function at kendo.all.min.js:66 at init.append (kendo.all.min.js:67) at init.onTreeDrop (Index:497) at init.trigger (kendo.all.min.js:25) at Object.drop (kendo.all.min.js:67) at init.dragend (kendo.all.min.js:66) at init.i (jquery-1.10.2.min.js:21) at init.trigger (kendo.all.min.js:25) at init._trigger (kendo.all.min.js:36) at init._end (kendo.all.min.js:36)
Index:497 Uncaught TypeError: t.children is not a function at kendo.all.min.js:66 at init.append (kendo.all.min.js:67) at init.onTreeDrop (Index:497) at init.trigger (kendo.all.min.js:25) at Object.drop (kendo.all.min.js:67) at init.dragend (kendo.all.min.js:66) at init.i (jquery-1.10.2.min.js:21) at init.trigger (kendo.all.min.js:25) at init._trigger (kendo.all.min.js:36) at init._end (kendo.all.min.js:36)
Dimitar
Telerik team
 answered on 01 Jun 2017
3 answers
251 views

Hello,

I'm currently trying to implement an ASP.NET MVC Grid that hosts products and displays additional product information via detail rows. The additional information in the detail row is depending on the product group (e.g. products of productgroup 1 should display additonal information a, b and c and products of productgroup 2 should display additonal information d, e and f). I tried to implement this using ClientDetailTemplateId combined with Partial Views:

<script id="template" type="text/html">
    # if(Productgroup == "Productgroup1") { #
    @{ Html.RenderPartial("Partial/Productgroup1View"); }
    # } else if(Productgroup == "Productgroup2") { #
    @{ Html.RenderPartial("Partial/Productgroup2View"); }
    # } else { #
    @{ Html.RenderPartial("Partial/DefaultView"); }
    # } #
</script>

 

In the partial views in want to use a NumericTextBox to display product information like:

@(Html.Kendo().NumericTextBox()
      .Value("#= NumericProductProperty1 #")
      .Name("NumericProductProperty1"))

 

As the Value property of a numeric textbox needs a decimal this is not working.

Is there any way to solve my problem? Is there a possibility to use early bound properties in client templates? In general: Is ClientTemplateId the recommended way to implement my requirements?

I tried to solve my problem using a server-side DetailTemplate but this is not working with an Ajax datasource.

Any help is appreciated!

Regards

Raphael

Stefan
Telerik team
 answered on 01 Jun 2017
13 answers
3.1K+ views
Hello,
How can i add a confirm modal window when deleting a row from the grid?
i was inspired by this example,
http://jsfiddle.net/Xtreu/ because of the gray colors that fits with the default theme from kendo ui.
but because i am not using it in a form,i do not know how to make it modal.

Regards,
Daniel
Gary
Top achievements
Rank 1
 answered on 01 Jun 2017
4 answers
1.4K+ views
Hi,
I'm building SPA using kendo ui and angularjs for client-side and asp.net web api for server-side. Customer wants server paging, filtering and sorting in grids. I know, how to configure kendo grid, so I only need to implement it on my server.
I found solution to use .ToDataSourceResult() with the DataSourceRequest parameter, but the problem is that I'm not using entity framework for all db stuff - the requirement is to use dapper https://github.com/StackExchange/dapper-dot-net, so I should generate sql queries on the fly.
Are there some code samples or even already written components for this scenario?
Richard
Top achievements
Rank 1
 answered on 31 May 2017
4 answers
1.1K+ views

I created a new project using the Telerik ASP.NET Core MVC Application template.  After the solution is created there is an error saying the dependency is missing.

What needs to be installed to have this dependency?

I have the latest DevTools (v2016.2.714) installed.

 

Nikolay Mishev
Telerik team
 answered on 31 May 2017
1 answer
273 views

Dear Team...

 

I am new to Kendo implementation and hence i am creating this thread.

Currently, i am working on Kendo UI in my ASP.NET MVC application and i am facing issues in Grid Globalization...

 

Problem Statement

The application is a multi-lingual application which needs to change the language based on the user's preference.

Now, if user changes his preference to "DE" from "EN" then, on the next login the complete application should load in "DE".

 

Approach to the Problem

For other part of the application i am using Resource files and everything is working as expected

But, for kendo UI components such as grid etc. i need them to be loaded in "DE" too.. Based on the http://docs.telerik.com/aspnet-mvc/getting-started/globalization#localized-user-interface, i implemented the below lines in my layout.cshtml page so that it will be applied to all the pages...

_Loyout.cshtml

@{
        var culture = System.Globalization.CultureInfo.CurrentCulture.ToString();
    }
    <script src="@Url.Content("~/Scripts/kendo/2017.2.504/cultures/kendo.culture." + culture + ".min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/2017.2.504/messages/kendo.messages." + culture + ".min.js")"></script>
    <script>
        @Html.Kendo().Culture(false)
    </script>

 

Issue

Kendo grid is not changing "DE" language, i am still seeing some the english text such as "Items", "items per Page", etc.

Question

Could any one please let me know how to implement the Globalization in a proper way so that i can see the grid in complete "DE" language...?

 

Thanks,

Krishna

Georgi
Telerik team
 answered on 30 May 2017
2 answers
716 views

Hi,

I'm using an MVC Window on one of my pages.  When I attempt to open the window in Chrome, I see a little gray rectangle where the "X" button should be.  When I open it in Internet Explorer 11, I don't see any button at all.  The button still works as intended when I hover over where the button should be.  This only happens when I publish to IIS.  Local runs on my PC work just fine -- I can see the "X".

Note that our remote web servers can't connect to the Internet at all.  Could that be an issue?  Is there a workaround?

Any thoughts?  Thanks!

01.@(Html.Kendo().Window()
02.    .Name("depwin")
03.    .Width(950)
04.    .Height(650)
05.    .Position(p => p.Top(100).Left(100))
06.    .Title("Application Dependencies")
07.    .Modal(true)
08.    .Iframe(true)
09.    .Draggable(true)
10.    .LoadContentFrom("Dependencies", "Application", new { id = Model.Id })
11.)
Brian
Top achievements
Rank 2
Iron
 answered on 30 May 2017
2 answers
252 views

I have a bar chart, which has a pop-up pie chart (showing some more granular information) in a tooltip.

This works well, except I don't seem able to change the thick border surrounding the pop-up chart (image attached). I've tried configuring the various borders (tooltip on the main chart, chartArea on the pop-Up chart etc..), but nothing makes any difference.  What do I need to set to reduce the border thickness?

The main chart tooltip is defined here:-

.Tooltip(tooltip => tooltip
            .Visible(true)
           .Template("#=tooltipTemplate(dataItem)#")
        )

 

The tooltip template here:-

<script id="childChartTemplate" type="text/x-kendo-template">
    <div id="childChart" />
    # setTimeout(function() { createChildChart(AdditionalID,Year,Mth,XValue); }) #
</script>

 

The JavaScript is:-

var tooltipTemplate = kendo.template($("#childChartTemplate").html());
 
 
           function createChildChart(medicID,Year, Mth, PractName) {
 
               var childDataSource = new kendo.data.DataSource({
 
                   transport: {
                       read: {
                           url: "@Url.Content("~/Dashboard/GetMonthlyMedicSessionSummary/Get")",
                   dataType: "json",
                   data: {
                       MedicID: medicID,
                       year: Year,
                       mth:Mth,
                       DirectorateID: selectedDirectorate
                   }
               }
               }
           });
           $("#childChart").kendoChart({
               dataSource: childDataSource,
               title: {
                   text: "Session Type Split - " + PractName,
                   font: "11px Arial"
 
               },
               theme:"bootstrap",
               legend: {
                   visible: true
               },
               seriesDefaults: {
                   type: "pie",
                   labels: {
                       visible: true,
                       format: "{0}"
                   }
               },
               
               series: [{
                   field: "YIntValue",
                   categoryField: "XValue",
                   name: "Session Type",
                   labels: {
                       visible: true,
                       distance: 15
 
                   }
               }]
           });
           }

Thanks

 

AP
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 30 May 2017
5 answers
1.1K+ views

(See attachment)

I have a grid that needs:

1. Two PDF export buttons and 1 Excel export button.

2. Include the hidden or not visible columns.

3. Change the PDF export look. The export looks like a screen shot of the grid and won't fly with the users.

 

TIA

Brent

Stefan
Telerik team
 answered on 29 May 2017
1 answer
747 views

Hello,  currently i have this and it works great..   What i need is for the Categories in CategoryAxis to be dynamicand not the static .Categories("1", "2", "3", "4", "5")..       

I already have the value i want to put in there coming from my model,  its "@item.SurveyLinearCounts.FirstOrDefault().Min"   for the minimum value  and  @item.SurveyLinearCounts.FirstOrDefault().Max"   for the maximum

   How do i do this.?

 @(Html.Kendo().Chart<AnalyzeResponseViewModel>()
                                  .Name(@item.SurveyQuestionID.ToString())
                                  .Legend(legend => legend
                                      .Position(ChartLegendPosition.Top)
                                      .Visible(true)
                                  )
                                  .ChartArea(chartArea => chartArea
                                      .Background("transparent")
                                  )
                                  .Series(series =>
                                  {
                                      series.Column(model => model.ResponseCount).Name("Count").Tooltip(tooltip => tooltip.Visible(true).Template("#= series.name #: #=  value #"));
                                  })
                                   .CategoryAxis(axis => axis
                                      .Categories("1", "2", "3", "4", "5")
                                      .MajorGridLines(lines => lines.Visible(false))
                                  )
                              .
                              )
                                  .ValueAxis(axis => axis
                                      .Numeric()
                                      .Line(line => line.Visible(false))
                                      .MajorGridLines(lines => lines.Visible(true))
                                  )
                                  .DataSource(ds => ds
                                      .Read(read => read.Action("GetSurveyResponseChart", "DataSource", new { item.SurveyQuestionID })))
                                  .Tooltip(tooltip => tooltip.Visible(true).Template("#= series.name #: #= value #")))
Alex Hajigeorgieva
Telerik team
 answered on 29 May 2017
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
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
Security
ColorPicker
DateRangePicker
Wizard
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?