Telerik Forums
UI for ASP.NET MVC Forum
23 answers
590 views
At my organization, we have attempted to upgrade an asp.net MVC solution in Visual Studio 2013 using the Solution Upgrade Wizard from v2014.1.318.545 to v2014.1.528.545 on two different machines without success. 

The wizard manages to remove old content and scripts and add 400+ files, but a crash always occurs before it completes the process.  The crash causes the environment to restart, and the upgrade is very obviously incomplete.

Is this an issue that has been reported by anyone else?  Is there an alternative way to update our project instead of using the upgrade wizard?  Thanks!
Ventsi
Telerik team
 answered on 15 Sep 2015
1 answer
107 views

I've got data that looks like this from a DB:

FromSomething    ToSomething    Amount

place a                   place b             1.55

place d                   place b              2.33

place a                   place f               1.20

and so on .....

I need it to go in a matrix that looks like this:

                  place b           place f       place m

place a       1.33               1.25          .50

place b        0                   1.00          .25

 

I can't get this to work at all, using the pivot grid and configuring it like the Telerik demos site, using local binding.  The grid is blank.

Is the pivot grid right for this?  If so, how should it work?

Georgi Krustev
Telerik team
 answered on 15 Sep 2015
1 answer
205 views

What is the recurrenceId field for in the scheduler and if it is important why or why is it not part of the ISchedulerEvent interface that is required for the scheduler view model???????????????????

What exactly is going on with this product?

Vladimir Iliev
Telerik team
 answered on 15 Sep 2015
1 answer
1.2K+ views

Hi,

I am having problems getting the total count field from JSON odata using the Html Helper for the Kendo Grid. Getting the odata.count value using JavaScript is fine though but our preference is to use the MVC html helper. The following is both examples:

 

Using MVC Html Helper produces the following JavaScript error: Uncaught TypeError: Cannot read property 'count' of undefined. See the Schema property for where we are trying to get the oData.count.

@(Html.Kendo().Grid<DataObject>()
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(e => e.Field1).Filterable(false);
        columns.Bound(e => e.Field2);
        columns.Bound(e => e.Field3);
    })
    .DataSource(dataSource => dataSource
        .Custom()
        .Type("odata")
        .Schema(schema =>
        {
            schema.Data("value")
                 .Total("odata.count");
        })
        .Transport(transport =>
        {
            transport.Read(read => read.Url("/odata/DataUrl).DataType("json"));
        }
        )
        .PageSize(5)
        .ServerPaging(true)
        .ServerSorting(true)
        .ServerFiltering(true)
    )
    .Pageable()
    .Sortable()
    .Filterable()
)


Using the following JavaScript works:

$(".grid").kendoGrid({
            dataSource: {
                type: "odata",
                transport: {
                    read: {
                        url: "/odata/DataUrl",
                        dataType: "json"
                    }
                },
                schema: {
                    data: function(data) {
return data['value'];
                    },
                    total: function(data) {
                        return data['odata.count'];
                    },
                    model: {
                        fields: {
                            Field1: { type: "date" },
                            Field2: { type: "string" },
                            Field3: { type: "string" },
                        }
                    }
                },
                pageSize: 20,
                serverPaging: true,
                serverFiltering: true,
                serverSorting: true
            },
            filterable: true,
            sortable: true,
            pageable: true,
            columns: [
                {
                    field: "Field1",
                    filterable: false,
                    format: "{0:MMM dd, yyyy}"
                },
                {
                    field: "Field2",
                    filterable: false
                },
                {
                    field: "Field3",
                    filterable: false
                }
            ]
        });



JSON

{
  "odata.metadata":"http://localhost:15649/odata/$metadata#​DataUrl","odata.count":"100","value":[
    {
      "​Field1":"2015-07-21T11:45:38.927"
      ,"​Field2":"2015-07-21T11:33:41.067"
      ,"​Field3":"2015-07-21T11:45:35.993"
    }
    ...
  ]}

 

Looking in the documentation there are only examples of this using javascript, are there some examples using the html helpers as well somewhere? Any pointers in the right direction are welcome.

thanks,

Rob

Alexander Popov
Telerik team
 answered on 15 Sep 2015
1 answer
82 views

Hi,

I did search for your private bower repositories. The UG link is broken from your site.

 http://docs.telerik.com/kendo-ui/install/bower#install-kendo-ui-professional-bower-package

 404 - File or directory not found.​​

 Also the same for this below page too.

http://docs.telerik.com/KENDO-UI/install/custom#cdn​

Petyo
Telerik team
 answered on 15 Sep 2015
1 answer
496 views

Hi,

we try to update with the VS Extension by clicking "Upgrade Wizard" from our current 2015.2.805.545 Dev Version to the newest 902 version.

After a few minutes Visual Sutdio freezes on "Copy Globalization files" from Telerik.
I try to wait the whole night, checked for this this morning but no change.

 

Any ideas?

Yana
Telerik team
 answered on 14 Sep 2015
5 answers
418 views

I working with the telerik grid a since a few weeks.

It seems that the Bound() Method of the MVC Grid ignores the Type when I write Bound(type, name).

When I have a model binded grid, it works perfectly:

    @(Html.Kendo().Grid<Web.Models.Consumption.PDCAModel.PDCAActionplanModel>()
                            .Name("PDCAActionplanGrid")
                            .NoRecords(@ResourcesLocal.Resources_Energy_PDCA.NoActionplanAvailable)
                            .Columns(col =>
                            {
                                col.Bound(x => x.PlanCreatedAt).Title(ResourcesLocal.Resources_Energy_PDCA.PlanCreatedAt).Width(200).Format("{0:dd.MM.yyyy}");
                                col.Bound(x => x.PlanstringTranslated).Title(ResourcesLocal.Resources_Energy_PDCA.Planstring);

                            })
                            .Events(e => e.DataBound("PDCAActionplanGrid_DataBound"))
                            .ClientDetailTemplateId("template")
                            .DataSource(ds => ds
                                .Ajax()
                                .Read(read => read.Action("DataSourcePDCAActionplanGrid", "Consumption"))
                                )

                        )

Here my column "PlanCreatedAt" is a datetime which will be shown perfectly.

Now I want to use a dynmic binded grid with a DataTable as DataSource:

     @(Html.Kendo().Grid<dynamic>()
            .Name("CompilationLogicGrid")
            .NoRecords()
            .Columns(col =>
            {
                col.Bound(typeof(DateTime), "Date").Filterable(false).Title(ResourcesGlobal.GlobalResources.Datum).Format("0:dd.MM.yyyy");

            })
            .Filterable(filtering => filtering.Enabled(true))
            .Sortable()
            .DataSource(dataSource => dataSource.Ajax()
                    .Read(read => read.Action("DataSource_CompilationLogicGrid", "Consumption"))
                    .Sort(x => x.Add("Date").Descending()))
        )

There it seems, that the binding will completly ignored. The output is either a plain string which I wrote in the format 0:dd.MM.yyyy or a  the plain output of the json response

The JSON Response is on both grids exactly the same: /Date(xxxxxxxxxx)/

Viktor Tachev
Telerik team
 answered on 14 Sep 2015
1 answer
167 views

I am using the scheduler binding to local data from my viewmodel.  The scheduler is set to TimeZone of "Etc/UTC" and all the dates are stored as UTC however they are all adjusted in the scheduler. How can I turn off scheduler timezone adjustments. There  should be nothing to adjust to since everything is UTC!

Honestly, I keep running into problem after problem with these products and I think that $2,000 was a big mistake.

Andrew
Top achievements
Rank 1
 answered on 13 Sep 2015
1 answer
2.0K+ views

The problem is I'm not able to pass the date selected by user from Kendo Date time picker in View to Controller using ajax call. Any help or input would be much appreciated. When I put the debugger, I found that control is just passing over it but not hitting the  Action method in the Home controller.

 

View

===================================================================================================================

<div class="chart-wrapper">
    @(Html.Kendo().Chart()
        .Name("chart")
        .Title("Power Output")
        .Legend(legend => legend
            .Position(ChartLegendPosition.Bottom)
        )
        .ChartArea(chartArea => chartArea
            .Background("transparent")
        )
        .SeriesDefaults(seriesDefaults =>
            seriesDefaults.Area().Line(line => line.Style(ChartAreaStyle.Smooth))
        )
        .Series(series =>
        {
            series.Area(ViewBag.Value).Name("Power");
        })
        .CategoryAxis(axis => axis
            .Date()
            .Categories(ViewBag.TimeStamp)
        )
        .ValueAxis(axis => axis
            .Numeric()
            .Labels(labels => labels.Format("{0}"))
            .AxisCrossingValue(-10)
            .Line(line => line.Visible(false))
        )
        .Tooltip(tooltip => tooltip
            .Visible(true)
            .Format("{0}%")
            .Template("#= series.name #: #= value #")
        )
    )
    </div>
<div>
    <h4>Select Date</h4>
    <input id="datepicker"/>
    <script>
        $(document).ready(function() {
            function onChange() {
                debugger;
                var date = kendo.toString(this.value());
                $.post('/Home/Index', { "date": date }, function () {
                    alert("data is posted successfully");
                    window.location.reload(true);
                });
                //this.close();
            }
            $("#datepicker").kendoDatePicker({
                open: onChange,
                value: new Date()
            });

        })
    </script>
</div>

=========================================================================================================================

Controller

=========================================================================================================================

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Mvc;
using SparklineChart.Models;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using Newtonsoft.Json.Linq;

namespace SparklineChart.Controllers
{
    public class HomeController : Controller
    {
        private static Class1[] _download_serialized_json_data<ActualPower>(string url) where ActualPower : new()
        {
            //This is to temporarily to disable the SSL Certificate check.
            ServicePointManager.ServerCertificateValidationCallback = delegate (object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
            { return true; };

            using (var w = new WebClient())
            {
                var json_data = string.Empty;
                try 
                {
                    json_data = w.DownloadString(url);
                }
                catch (Exception ) { }
                return !string.IsNullOrEmpty(json_data) ? JsonConvert.DeserializeObject<Class1[]>(json_data) : new Class1[] { };

            }
        }

        [HttpGet]
        public ActionResult Index()
        {

            var url = "https://raise.tra.trafficmanager.net/apiv1/abb/raise/rest/measured/9fcecb42-7dfc-407e-bf31-a447f0650447/Actual%20Power";
            var actualPower = _download_serialized_json_data<ActualPower>(url);
            Dictionary<DateTime, decimal> power = new Dictionary<DateTime, decimal>();
            List<decimal> value = new List<decimal>();
            List<DateTime> timeStamp = new List<DateTime>();
            foreach (var item in actualPower)
            {
                power.Add(Convert.ToDateTime(item.timeStamp.localTimeStamp), Convert.ToDecimal(item.deviceData.value));
                value.Add(Convert.ToDecimal(item.deviceData.value));
                timeStamp.Add(Convert.ToDateTime(item.timeStamp.localTimeStamp));
            }
            ViewBag.Power = power;
            ViewBag.Value = value;
            ViewBag.TimeStamp = timeStamp;
            return View();
        }
        

        [HttpPost]
        public String Index(DateTime date)
        {
            if (date != null)
            return "Success";
            return "Failure";
            //return Content(Convert.ToString(date));
        }

        public ActionResult About()
        {
            return View();
        }


    }
}

Georgi Krustev
Telerik team
 answered on 12 Sep 2015
9 answers
324 views

Hi 

I have question to you how I can pass id to my custom popup.
The whole problem is that I need to load specific data to my dropdownlist. and I need pass id off item which is in edition.

I tried:

  • use JavaScript function in  .Data("passCategoryId") but I don't know how to get item clicked to edition. ​I tried setup id in onEdit event in TreeList but it is call afer function passCategoryId...
  • I tried also go this way but also when I check passed value is null

@Html.Kendo().DropDownListFor(m => m.Level).DataTextField("Text").DataValueField("Value").DataSource(dataSoruce => dataSoruce.Read(read => read.Action("LoadPosibleOrderDll", "ProductCategories", new { categoryId = Model.ParentCategory })))

 

model of tree list

.Model(model =>   {         model.Id(p => p.Id);
                            model.ParentId(p => p.ParentId);                             model.Field(p => p.Id).Editable(false);                             model.Field(p => p.Level);                             model.Field(p => p.ProductCategoryOrder);                             model.Field(p => p.Parent.Name);                             model.Field(p => p.OrderPosibilities );                                                      })​

Rosen
Telerik team
 answered on 11 Sep 2015
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?