Telerik Forums
UI for ASP.NET MVC Forum
7 answers
509 views
If I open the demo at http://demos.kendoui.com/web/tabstrip/index.html and hit Tab to navigate using the keybard, I can see a blue margin highlighting that the TabStrip has focus. 

If I open the theme editor with the default theme, there is no indication that the TabStrip has focus. How can I get my TabStrib to provide feedback to the user that it has focus as the demo page does?

Thank you
Ande2013
Top achievements
Rank 1
 answered on 24 Jun 2013
2 answers
477 views
Hi!

I'm new to MVC4 and thus built some little demo including a Kendo UI Grid and a partial view which serves as a custom editor. Everything works perfect except that the AntiForgeryToken gets lost on the way.

This is my definition of the grid:
@(Html.Kendo().Grid(Model)
    .Name("grdProducts")
    .Columns(columns =>
        {
            columns.Bound(p => p.Name);
            columns.Bound(p => p.ProductType);
            columns.Bound(p => p.SellStartDate);
            columns.Bound(p => p.SellEndDate);
            columns.Command(command => command.Edit()).Width(160);
        })
    .ToolBar(toolbar => toolbar.Create())
    .Editable(editable => editable
        .Mode(GridEditMode.PopUp)
        .DisplayDeleteConfirmation(true)
        .TemplateName("ProductEditor")
        .Window(w => w
            .Width(700)
            .Title("Edit Product")))
    .Pageable(pa => pa.Numeric(false).PageSizes(new [] {5,10,20}))
    .Scrollable(scr => scr.Height(430).Virtual(false))
    .Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
    .DataSource(dataSource => dataSource
        .Ajax()
        .AutoSync(false)
        .Batch(false)
        .PageSize(20)
        .ServerOperation(false)
        .Model(model =>
            {
                model.Id(p => p.Id);
                model.Field(p => p.Id).Editable(false);
                model.Field(p => p.CategoryName).Editable(false);
                model.Field(p => p.ProductType).DefaultValue((int)ProductTypeEnum.Cameras);
            })
        .Create(create => create.Action("EditingCreate", "Product"))
        .Read(read => read.Action("EditingRead", "Product"))
        .Update(update => update.Action("EditingUpdate", "Product"))
    )
)
And this is the start of my partial view named "ProductEditor.cshtml" saved in subdir "EditorTemplates":
@model _ProductStore.Infrastructure.Models.Products.Product

@{
    ViewBag.Title = "Edit";
}

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
 
    <fieldset>
... all labels and fields...
    </fieldset>
}
The popup opens as it should and everything works fine except that the hidden input for AntiForgeryToken looks like this:
<input name="__RequestVerificationToken" type="hidden" data-bind="value:__RequestVerificationToken" value=""/>
In other words: the value is empty. Placing the AntiForgeryToken helper somewhere else in my views it is working perfectly.

What am I doing wrong?

Regards
Neils






Heiko
Top achievements
Rank 1
Iron
Veteran
 answered on 24 Jun 2013
1 answer
194 views
Hi,
In below url you have two example HTML and Asp.net MVC.

http://demos.kendoui.com/web/autocomplete/index.html


Can you tell me what is difference between this two.(HTML and Asp.net MVC)


Thank you
Amitkumar

Atanas Korchev
Telerik team
 answered on 24 Jun 2013
3 answers
2.3K+ views
hi,

I test kendoui MVC razor, follow this way my test project

_Layout.cshtml

   <script src="@Url.Content("~/Scripts/kendo/jquery.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/kendo.web.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/kendo.aspnetmvc.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/console.min.js")"></script>
    <script src="@Url.Content("~/Scripts/kendo/prettify.min.js")"></script>

index.cshtml 

@(Html.Kendo().DatePicker().Name("Birthday"))

But have error on javascript 

TypeError: jQuery(...).kendoDatePicker is not a function

Ilyas
Top achievements
Rank 1
 answered on 21 Jun 2013
1 answer
644 views
I have a Grid-component that is populated by a call to a service, from an action in my controller. I was wondering if it is possible to do this continuously, so that it will update the grid with real-time data? 

Right now, my view looks like this;
@model FleetMonitorModel
 
<div class="span12">
    <legend>Fleet Monitor</legend>
        <div>
        @(Html.Kendo().Grid<FleetMonitorModel>()
              .Name("Grid")
              .DataSource(ds => ds
                  .Ajax()
                  .Read(read => read.Action("Get", "FleetMonitor"))
              )
              .HtmlAttributes(new { style = "height:auto;" })
              .AutoBind(true)
              .Columns(columns =>
                  {
                      columns.Template(p => { }).ClientTemplate(" ").Width(310);
                      columns.Template(p => { }).ClientTemplate(" ").Width(250);
                      columns.Template(p => { }).ClientTemplate(" ").Width(150);
                      columns.Template(p => { }).ClientTemplate(" ");
                      columns.Template(p => { }).ClientTemplate(" ").Width(80);
                  })
              .ClientRowTemplate(Html.Partial("_ClientRowTemplate", Model).ToHtmlString())
              .Pageable()
              .Sortable())
    </div>
</div>
And my controller like this:
    private FleetMonitorModel Model { get; set; }
 
    ...      
 
    public ActionResult Get([DataSourceRequest] DataSourceRequest request)
    {
        UnitContract[] listOfUnitsFromService = Client.GetListOfUnits(true);
 
        Model = new FleetMonitorModel()
                    {
                        UnitDetails = GenerateUnitDetails(listOfUnitsFromService.ToList()),
                        Refresh = true
                    };
 
        return Json(Model.UnitDetails.ToDataSourceResult(request));
    }
}

Basically, the service will provide a steady stream of updated data, causing it to be more or less real-time.. All I want to accomplish, is to refresh the grid with my new data and update the graphical elements of my template. Current template is working fine, but data is only refreshed when page is refreshed.
Vladimir Iliev
Telerik team
 answered on 21 Jun 2013
6 answers
233 views
Hi,

I currently have a model with several properties, one of which is a Spatial object (of type DbGeometry). If this spatial property is NULL, everything works fine, but if it's not, my ListView throws an exception (ironically enough, it thinks the problem is that the list is null). My list creation code is below:

@(Html.Kendo().ListView(Model.ToList())
    .Name("s-list-event-container")
    .TagName("div")
    .HtmlAttributes(new { @class = "s-list-container" })
    .ClientTemplateId("template-list-event")
)
where "Model" refers to an IEnumerable object.

If there is no way to populate the ListView while the model has a DbGeometry object, is there at least a way to ignore specific properties of a model?

Thanks,
Jeff
Petur Subev
Telerik team
 answered on 21 Jun 2013
3 answers
798 views
Is it possible to filter an MVC Listview based on text entered into a textbox? if so how would one go about doing so?

for example a listview that returns over 400 records, and needs to be searchable.

Stephen Graham
Top achievements
Rank 1
 answered on 20 Jun 2013
1 answer
84 views
This screen shot says it all:
https://dl.dropboxusercontent.com/u/17474320/Validator-Miss-positioned.png

The code has:

            @(Html.Kendo().DropDownList()
                  .Name("OwnerUserId")
                  .HtmlAttributes(new { style = "width:200px", @required = true })
                  .OptionLabel("(Select User)")
                  .DataTextField("Name")
                  .DataValueField("Id")
                  .DataSource(source => {
                       source.Read(read => {
                           read.Action("GetCascadeUser", "ComboBox")
                              .Data("filterUsers");
                       }).ServerFiltering(true);
                  })
                  .Enable(true)
                  .AutoBind(true)
            )

How do I fix that, so the validation is positioned correctly?
Petur Subev
Telerik team
 answered on 20 Jun 2013
5 answers
127 views
Hi there,

I'm sure this is a simple problem to solve, but it completely eludes me - I have an MVC grid bound to my model, and a custom command column to show a popup window with additional details about that row. However, on execution, the actual command instead shows the following:

<a class="k-button k-button-icontext k-grid-View Details" href="/Reporting/Stock?Stock-page=2&Stock-pageSize=10"><span></span>View Details</a>
Note the href - this is wrong, but I cannot for the life of me understand where it's appearing from!

My grid setup:
<% Html.Kendo().Grid(Model)
           .Name("Stock")
           .Columns(columns =>
               {
                   columns.Bound(o => o.SKU).Title("SKU");
                   columns.Template(o => Html.Truncate(o.Name, 60)).Title("Name");
                   columns.Template(o => Html.ActionLink(Html.Truncate(o.Region, 40), "Details", "Stock"));
                   columns.Bound(o => o.Type);
                   columns.Bound(o => o.Quantity);
                   columns.Command(command => command.Custom("View Details").Click("showDetails"));
               })
           .Pageable()
           .Groupable()
           .Sortable()
           .Render();
           %>
Anyone have insight into this, what am I missing?
Big Daftie
Top achievements
Rank 1
 answered on 20 Jun 2013
1 answer
184 views
Hi there,

I've just installed KendoUI, but the grid examples aren't working.  It is showing this error:

Server Error in '/' Application.
The system cannot find the file specified

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ComponentModel.Win32Exception: The system cannot find the file specified

Source Error:
Line 1: @model IEnumerable<Kendo.Mvc.Examples.Models.Product>
Line 2:
Line 3: @(Html.Kendo().Grid(Model)
Line 4: .Name("Grid")
Line 5: .Columns(columns => {

Source File: c:\Program Files (x86)\Telerik\Kendo UI for ASP.NET MVC Q1 2013\wrappers\aspnetmvc\Examples\Areas\razor\Views\web\grid\serverbinding.cshtml    Line: 3

This happens to all the grid examples.  Other examples I checked are working, e.g. Menu, Multiselect.  How can I get the grids to work?

Amanda
Vladimir Iliev
Telerik team
 answered on 20 Jun 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
ColorPicker
DateRangePicker
Security
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?