Telerik Forums
UI for ASP.NET MVC Forum
1 answer
245 views
I'm using an EventTemplate to display in the agenda view.  I'd like to add a button in the template that will open the Edit window.  I've searched through the forums, but have not been able to find an example.  Can you provide an example showing how to do this?

Thanks,
-Pete
Rosen
Telerik team
 answered on 07 Nov 2013
2 answers
655 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
696 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
182 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
222 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
188 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
743 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
326 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
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
DropDownButton
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
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
LLM Kit
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?