Telerik Forums
UI for ASP.NET MVC Forum
2 answers
613 views
Hi, I am using Telerik's dropdownlist in my MVC application View. I am facing two problems:

 1) When I run my application, I find every value of kendo dropdownlist is "Undefined".
   This is the code for my View:
      @model IEnumerable<EulenMgrKendoUIMvcApplication.Dominio.Tablas.DelegacionProductoUsuario>

     @(Html.Kendo().DropDownListFor(d=>d)

            .Name("IdDelegacionProductoDrpDwn").HtmlAttributes(new { @style = "font-size:12px" })
            .DataTextField("IdDelegacionProducto")
            .DataValueField("IdDelegacionProducto")
            .BindTo((System.Collections.IEnumerable)ViewData["IdDelegacionProducto"]))

   This is my controller, where I populate the dropdownlist:
   public class DelegacionProductoUsuarioController : Controller
         public ViewResult List()
        {
            IEnumerable<DelegacionProductoUsuario> delegaciones = DelegacionProductoUsuario.GetAll();
          PopulateDelegacionProducto();
            return View(delegaciones);
        }
       private void PopulateDelegacionProducto()
        {
            List<Int64> IdDelegacionProductoList = new List<Int64>();
            foreach( DelegacionProductoUsuario d in DelegacionProductoUsuario.GetAll()){
                IdDelegacionProductoList.Add(d.IdDelegacionProducto);
            }
            ViewData["IdDelegacionProducto"] =IdDelegacionProductoList ;
        }
}

     I am debugging the application and the controller is passing to the view the proper values,so I don't understand why it doesn't show them.
 
2) Second problem: I insert this Dropdownlist in one of the columns of a kendo grid with no success. In it's place it appears a common label. Here is the code for
 my Grid, I mark in Bold the column where I try to show  my dropdownList:
      @(Html.Kendo().Grid(Model)
          .Name("Grid")
          .Columns(columns=>
          {
            columns.Bound(d => d.BorradoLogico).Title("Borrado logico");
            columns.Bound(d => d.FTick).Title("Ftick");
           columns.Bound(d => d.IdDelegacionProducto).Title("IdDelegacionProducto").EditorTemplateName("IdDelegacionProductoDrpDwn");    
            columns.Bound(d => d.IdUsuario).Title("IdUsuario");
         })
MAY SOMEBODY HELP ME PLEASE?
Goldfy
Top achievements
Rank 1
 answered on 07 Nov 2013
9 answers
601 views
I have 3 series of data (JSON) and am in MVC 4 but I cannot find any example or tutorial how to link the Json to a chart series?  Can you share a link?

Ok I have 3 series of data (ex.  3 countries and a sum for each country) can be string, json whatever....
using MVC 4  is there a clear example of using a view how I map these series to a chart????? 

I am searching Telerik/Kendo and no sample for MVC 4  and chart (not grid) is coming up.

Iliana Dyankova
Telerik team
 answered on 07 Nov 2013
1 answer
1.4K+ views
How do you bind a custom function to the "requestEnd" event of a dataSource with MVC notation? 

Dimiter Madjarov
Telerik team
 answered on 07 Nov 2013
1 answer
123 views
using syntax to bind to JSON series data, .SeriesColors array syntax error

@(Html.Kendo().Chart(Model)
.Name("chart1")
.Title("IV Capture")
.DataSource(dataSource => dataSource.Read(read => read.Action("FetchChartData", "Home"))
.Group(group => group.Add(model => model.SModality))
.Sort(sort => sort.Add(model => model.Zone).Ascending())
)
.Series(series =>
{
series.Column(model => model.IValue)
.Name("value")
.Stack(true);
})
 
.CategoryAxis(axis =>
axis.Categories(model => model.Zone)
.Labels(labels => labels.ToString())
)
.ValueAxis(axis => axis
.Numeric().Labels(labels => labels.Format("{0}"))
)
  .SeriesColors(["#cd1533", "#d43851", "#dc5c71", "#e47f8f", "#eba1ad","#99d7ef"])
)

above syntax is wrong for .SeriesColors

Iliana Dyankova
Telerik team
 answered on 06 Nov 2013
3 answers
174 views
The Brazilian Portuguese translations of Kendo Complete are just terrible, so I went to all the trouble to review the entire resource file and translate everything that wasn't translated, and corrected all mistakes (there were many, many mistakes). I'm attaching the reviewed resource file so that you can, hopefully, provide a better PT-BR translation on the next releases. But I needed it right now so my application could benefit from the corrected translation. I've followed the guidelines at: http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/globalization#changing-the-localization-messages

The problem is that I just can't recompile the solution at all. The following references aren't resolving:

System.Web.Mvc
System.Web.Razor
System.Web.WebPages
System.Web.WebPagesDeployment
System.Web.WebPages.Razor

I don't have ASP.NET MVC 3, I only have ASP NET MVC 4. I can use Kendo perfectly in my projects, I just can't recompile it.
I've tried to add the Asp.NET MVC nuget package to the solution without success. I'm getting the following log:

Attempting to resolve dependency 'Microsoft.AspNet.WebPages (≥ 3.0.0)'.
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (≥ 1.0.0.0)'.
Attempting to resolve dependency 'Microsoft.AspNet.Razor (≥ 3.0.0)'.
Installing 'Microsoft.Web.Infrastructure 1.0.0.0'.
Successfully installed 'Microsoft.Web.Infrastructure 1.0.0.0'.
Installing 'Microsoft.AspNet.Razor 3.0.0'.
Successfully installed 'Microsoft.AspNet.Razor 3.0.0'.
Installing 'Microsoft.AspNet.WebPages 3.0.0'.
Successfully installed 'Microsoft.AspNet.WebPages 3.0.0'.
Installing 'Microsoft.AspNet.Mvc 5.0.0'.
Successfully installed 'Microsoft.AspNet.Mvc 5.0.0'.
Adding 'Microsoft.Web.Infrastructure 1.0.0.0' to Kendo.Mvc.
Successfully added 'Microsoft.Web.Infrastructure 1.0.0.0' to Kendo.Mvc.
Adding 'Microsoft.AspNet.Razor 3.0.0' to Kendo.Mvc.
Uninstalling 'Microsoft.AspNet.Razor 3.0.0'.
Successfully uninstalled 'Microsoft.AspNet.Razor 3.0.0'.
Uninstalling 'Microsoft.Web.Infrastructure 1.0.0.0'.
Successfully uninstalled 'Microsoft.Web.Infrastructure 1.0.0.0'.
Install failed. Rolling back...
Could not install package 'Microsoft.AspNet.Razor 3.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

So I just can't recompile it, no matter what I do.

I'm using Visual Studio 2010 and I really need the correct translations for Kendo. How can I manage to compile it or get my hands at a compiled Kendo.Mvc.dll wit the correct resources linked?

I could also use my own Kendo localization project kendo-global if I could prevent the Html helpers from adding the localization text to the javascript they produce. Is there a way to prevent the Html helpers from adding the localized messages so that I could just include my own files from kendo-global?
Vladimir Iliev
Telerik team
 answered on 06 Nov 2013
2 answers
150 views
Here is my code:
    @(Html.Kendo().Grid(Model.Select(hp => new HCS.Web.Models._HealthPlan()
        {
            ID = hp.ID,
            LegalName = hp.LegalName,
            FriendlyName = hp.FriendlyName,
            HasAdditionalTerms = hp.HasAdditionalTerms,
            AdditionalTermsFilename = hp.TermsFile,
            CommunicationFolder = hp.CommunicationFolder,
            ContactEmail = hp.ContactEmail,
            ContactName = hp.ContactName,
            ContactPhone = hp.ContactPhone,
            HHSHealthPlanID = hp.HHSHealthPlanID
        }))
        .Name("Grid")
        .Columns(columns =>
        {
 
            columns.Bound(p => p.ID).Visible(false);
            columns.Command(c => {
                                    c.Edit().Text(" ").HtmlAttributes(new { style = "width:30px; min-width:12px", title = "Click to Edit" });
                                    //c.Destroy().Text(" ").HtmlAttributes(new { style = "width:30px; min-width:12px", title = "Click to Delete" });
                                    }).Width(85);
            columns.Bound(p => p.LegalName).Title("Legal Name").Width(300);
            columns.Bound(p => p.FriendlyName).Title("Friendly Name").Width(120);
            columns.Bound(p => p.HasAdditionalTerms).Title("Additional Terms").Width(140);
            columns.Bound(p => p.AdditionalTermsFilename).Title("Additional Terms File").Width(200);
            columns.Bound(p => p.ContactName).Title("Contact Name").Width(120);
            columns.Bound(p => p.ContactPhone).Title("Contact Phone").Width(120);
            columns.Bound(p => p.ContactEmail).Title("Contact Email").Width(150);
            columns.Bound(p => p.HHSHealthPlanID).Title("HHS Health Plan ID").Width(150);
        })
    .ToolBar(tb => tb.Create().Text("Add New Health Plan"))
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .Pageable()
    .Scrollable(scrollable => scrollable.Virtual(true).Height(280))
    .Sortable()
    .Filterable()
    .DataSource(dataSource => dataSource
                .Ajax()
                .Model(model => model.Id(p => p.ID))
                .Create(update => update.Action("EditingInline_Create", "Grid"))
                .Read(read => read.Action("EditingInline_Read", "Grid"))
                .Update(update => update.Action("EditingInline_Update", "Grid"))
                .Destroy(update => update.Action("EditingInline_Destroy", "Grid")))
)
With the c.Destroy() command commented out, the page looks like ss1.png, with the c.destroy() included the page looks like ss2.png.

Help?!

Update:
Only happens in IE9. Firefox, Chrome, Opera, and Safari all display correctly.
Felickz
Top achievements
Rank 2
 answered on 06 Nov 2013
5 answers
1.7K+ views
Hello again,
How can i add a new item to the datasource of the dropdownlist, and after that do a refresh,so i can see the new added item.

Thanks and regards,
Daniel
Alexander Valchev
Telerik team
 answered on 06 Nov 2013
1 answer
696 views
I'm using the Grid Editor with a Partial View. One group of inputs in the editor should only be displayed if a boolean option is true (which has a corresponding checkbox on the form).

How do I configure the Grid Editor to trigger a Javascript event so that the group can be hidden/displayed according to whether the field is set (i.e., the checkbox is set)?

I've tried a couple things:
  • Calling the javascript method in the <script> block in the CSHTML template. This appears to be run before the values are filled in for the entry being edited, though.
  • Adding a window open event, but that event is not being triggered.
Thanks!
Dimiter Madjarov
Telerik team
 answered on 06 Nov 2013
1 answer
262 views
Hi,

I'm really enjoying using the PanelBar within a MVC app and I'm using to create a context-sensitive menu; I was wondering if you could point me at any example or useful code the would show me how I could make the whole PanelBar slide away and hide to the side of the screen then animate back in when hovering or click on some sort of tab ?

Thanks in advance

John
Burke
Top achievements
Rank 1
 answered on 05 Nov 2013
1 answer
58 views
I have an app that was recently developed by someone else, who happens to be on vacation this week.  So I am trying to compile it and deploy it into production.  However, I am getting an error that is telling me that in the following code, Kendo is undefined.  There are about a dozen similar errors throughout the code. 

@(Html.Kendo().TimePickerFor(m => m))

I have no experiance with Kendo but I have worked with Telerik's extension to MVC3.  But I am not having any luck resolving some issues when trying to compile this application on my local development machine. 

When looking at what I have installed, I have Kendo UI for MVC VSExtensions 2013.2.7160, which is the same version as the other developer, as I have access to his laptop.  So do I need to add a reference to something or install something to get this to work?

"Kendo" is underlined in red and tells mw that it is undefined. When I execute the app, I get dozens of JavaScript errors.

I suspect I am missing a reference or maybe the developer did not check in all of his code into our source control repository. So now I am working through the getting started documents on the Telerik Kendo website trying to figure out what I might be missing.

Any thoughts or suggestions would be grealy appreciated. 

Dimo
Telerik team
 answered on 05 Nov 2013
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?