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

Hi 

I have DropDownList control which looks: 

@(Html.Kendo().DropDownListFor(m => m.VatCategoryId)
               .Name("VatCategoryId")
               .DataTextField("Text") 
               .DataValueField("Value")
               .AutoBind(false)
               .DataSource(source =>
               {
                   source.Read(read =>
                   {
                       read.Action("GetVatCategoriesDefault", "VAT").Data("getCountry").Type(HttpVerbs.Get);
                   });
               })

In read method I am passing a list with categories. Some I want one of the item be selected. So I set property Selected = true in SlectedListItem. 

Data which view is receiving are good but the default category is not selected. 

What could be wrong? 

 

 

 

 

Nencho
Telerik team
 answered on 16 Dec 2015
5 answers
304 views

Hi,

I need to show a Window with a template as its content; the data will be JSON.

In other words, I need almost the same code showed in http://docs.telerik.com/kendo-ui/api/javascript/ui/window#configuration-content.template but using the ASP.NET MVC server wrappers. 
I've searched the documentation, the demos and the forum but without any luck.

Can you help me with some code, please?

Thank you.

Alex Gyoshev
Telerik team
 answered on 16 Dec 2015
3 answers
158 views

I have an edit cshtml page in an MVC app with a Kendo tabpanel on it.

The tabpanel works, as does data retrieval and updates.

My problem is that when I add a Kendo grid control, the tab panel stops working, and by "stops working", I mean that it no longer changes tabs. Regardless of what you click, it stays on the first tab.

It makes no difference if the grid is editable or not. Also makes no difference if the grid is inside or outside the tabpanel.

Any ideas? Thanks.
Greg
Top achievements
Rank 1
 answered on 15 Dec 2015
1 answer
332 views

Hi,

 I am trying to use notification animation builder for ASP.NET MVC ?

 Here is my couple of code what i have tried

@(Html.Kendo().Notification()
    .Name("notification")
    .HideOnClick(true)  
    )
I need to use animation for this ...

 

Kindly guide me how can i achive it ? 

 

Venelin
Telerik team
 answered on 15 Dec 2015
2 answers
850 views

Hi,

 Am using Javascript for rendering a Kendo Grid.  In Grid Edit pop up i have a script Template which is an MVC Kendo Template below,

<script id="popup-editor" type="text/x-kendo-template">                 

<div>

@(Html.Kendo().DatePickerFor(m => m.USReleaseDate).HtmlAttributes(new { @class = "form-control", placeholder = "US Release Date" }).Deferred())                </div>

</script>

 Following is my Kendo Editor pop up template code in javascript

template: kendo.template($("#popup-editor").html())

which is perfectly rendering values as expected.

 

However the problem is, the controls inside the pop up is a plain Html control (<input>) instead of kendo date picker. As i read in the forum, i tried to initialize it below the template like this

<script>     

$(function () {         

var usReleaseDate = $("#USReleaseDate");        

 if (usReleaseDate) {             

$("#USReleaseDate").kendoDatePicker( {    

 "format": "MM/dd/yyyy",    

 "min": new Date(1900, 0, 1, 0, 0, 0, 0),     

"max": new Date(2099, 11, 31, 0, 0, 0, 0) });        

 }             

});

but of no use.  How can i render kendo controls within a popup editor?

Rosen
Telerik team
 answered on 14 Dec 2015
1 answer
187 views

I just installed the trial version and I can't seem to get the DatePicker to function as it does in the example.

 

I added the scripts and styles to the directories as instructed.

We are MVC3 so my _Layout file looks like:

<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="../../Content/kendo/kendo.common.min.css"></script>
    <script src="../../Content/kendo/kendo.default.min.css"></script>
    <script src="@Url.Content("~/Scripts/kendo/jquery.min.js")"></script>
    @*<script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>*@
    <script src="../../Scripts/kendo/kendo.all.min.js"></script>
    <script src="../../Scripts/kendo/kendo.aspnetmvc.min.js"></script>
</head>

 

Everything seems to function correctly but the display doesn't match and I'm seeing Unexpected Token errors in the kendo.common.min.css and kendo.default.min.css files.

Dimiter Topalov
Telerik team
 answered on 14 Dec 2015
1 answer
117 views
below is the code on the documentation page for server filtering a dropdownlist  

http://demos.telerik.com/aspnet-mvc/dropdownlist/serverfiltering

Does this actually do anything ? 

 

namespace Kendo.Mvc.Examples.Controllers
{
    using System.Web.Mvc;
 
    public partial class DropDownListController : Controller
    {
        public ActionResult ServerFiltering()
        {
            return View();
        }
    }
}
Nencho
Telerik team
 answered on 14 Dec 2015
1 answer
122 views

Hi

I would like ask how to improve  example below to display text from drop down list after save item?

https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/grid/grid-editing-cascading-dropdownlist

Drop down lists work as I need but after save I see id. How to change it to display text for example category name.

 

 

Boyan Dimitrov
Telerik team
 answered on 14 Dec 2015
3 answers
131 views

Hi There,

I am trying to Get 'Copy To Excel' to work in Batch Edit Mode. (GridEditMode.InCell)

I used the Telerik example below (razor/grid/editing) and added the two following lines to be able to copy to Excel:

.Selectable(selectable => selectable.Mode(GridSelectionMode.Multiple).Type(GridSelectionType.Cell))
.AllowCopy(true)

(Telerik\UI for ASP.NET MVC Q2 2015\wrappers\aspnetmvc\Examples\VS2013)

However, I am not able to copy to Excel.

Here is the code with the added lines in bold:

@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.ProductViewModel>()    
    .Name("Grid")    
    .Columns(columns => {        
        columns.Bound(p => p.ProductName);
        columns.Bound(p => p.UnitPrice).Width(140);
        columns.Bound(p => p.UnitsInStock).Width(140);
        columns.Bound(p => p.Discontinued).Width(100);
        columns.Command(command => command.Destroy()).Width(110);
    })
    .ToolBar(toolbar => {
        toolbar.Create();
        toolbar.Save();        
    })
    .Editable(editable => editable.Mode(GridEditMode.InCell))
    .Selectable(selectable => selectable.Mode(GridSelectionMode.Multiple).Type(GridSelectionType.Cell))
    .AllowCopy(true)

    .Pageable()
    .Navigatable()
    .Sortable()
    .Scrollable()
    .DataSource(dataSource => dataSource        
        .Ajax()         
        .Batch(true)
        .PageSize(20)
        .ServerOperation(false)                
        .Events(events => events.Error("error_handler"))
        .Model(model => model.Id(p => p.ProductID))
        .Create("Editing_Create", "Grid")
        .Read("Editing_Read", "Grid")
        .Update("Editing_Update", "Grid")
        .Destroy("Editing_Destroy", "Grid")
    )
)

Cheers,

Greg

Dimiter Madjarov
Telerik team
 answered on 11 Dec 2015
4 answers
361 views
I have a pivot grid against flat remote data source that is based on the demo but when I try to add multiple measures at runtime only the first measure is displayed.  I can add additional measures from the configurator after page loads but I need the measures to show up on initial page load.  Is this possible?
Erik
Top achievements
Rank 2
 answered on 10 Dec 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
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
LLM Kit
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?