Telerik Forums
UI for ASP.NET MVC Forum
1 answer
116 views
Hi, I would like to have a week view but as all my events are always all day events I don't need the time line... basically I need something similar to the month view but just showing a week. Is this possible?
Vladimir Iliev
Telerik team
 answered on 18 Dec 2015
3 answers
690 views

I have a ​TreeList that simply does not display the data it is receiving through the remote binding.

I can confirm (via Fiddler AND the KendoUI for Chorme browser extension) that the JSON data received is loaded and does contain data. However, the tree list does not display it.

I can't seem to figure out why. Please see attached images.

I also tried turning AutoBind ON/OFF, ServerOperation ON/OFF. Nothing helps. I don't see what's wrong with it.

 

View:

            @(Html.Kendo().TreeList<Web.Models.LevelViewModel>()
                  .Name( "treelist1" )
                  .Columns( columns =>
                  {
                      columns.Add().Field( e => e.Name );
                  } )
                  .DataSource( dataSource => dataSource
                       .Read( read => read.Action( "Load", "Business" } ) )
                       .ServerOperation( false )
                       .Model( m =>
                       {
                           m.Id( f => f.Id );
                           m.ParentId( f => f.ParentId );
                           m.Expanded( true );
                           m.Field( f => f.Name );
                       } )
                  )
                  )

Controller:

            var result = controllerService.BuildLevel​s( 1 );
            return Json( result.ToTreeDataSourceResult( request,
                e => e.Id,
                e => e.ParentId
                ), JsonRequestBehavior.AllowGet );

 Model:

    public class LevelViewModel : ViewModelBase
    {
        public int Id { get; set; }
        public int? ParentId { get; set; }
        public string Name { get; set; }
        public int FunctionId { get; set; }
        public int LevelId { get; set; }
    }

  

 

Can you please help?

Viktor Tachev
Telerik team
 answered on 17 Dec 2015
1 answer
375 views

Hi,

I've got a Kendo Window which in turn loads a Kendo Tab Strip and I want to put a Kendo PanelBar on one of the tabs.  Is this feasible?

My window loads like this:

@(Html.Kendo().Window()
    .Name("viewJobLogWindow")
    .Draggable()
    .Resizable()
    .Width(640)
    //.Height(350)
    .Actions(actions => actions.Pin().Minimize().Close())
    .LoadContentFrom("ViewJobLogWindowsContent", "TeamsV2")
    .Visible(false)
    .Title("")
)

The action to load the window returns a partial view - here is that code:

@model TEAMSV2.Models.TeamsV2Model
<div class="page-wrap">
    @(Html.Kendo().TabStrip()
        .Name("JobLogTabs")
        .Animation(false)
        .Events(events => events
            .Select("onSelectJobLogTab")
        )
        .Items(tabstrip =>
        {
            tabstrip.Add().Text("Job Overview")
                .HtmlAttributes(new { index = 0, id = "JobOverviewTab" })
                .LoadContentFrom("GetJobLogTab", "TeamsV2", new { id = "JobOverviewTab" });
 
            tabstrip.Add().Text("Job Log")
                .HtmlAttributes(new { index = 1, id = "JobLogTab" })
                .LoadContentFrom("GetJobLogTab", "TeamsV2", new { id = "JobLogTab" });
 
            tabstrip.Add().Text("Job Documents")
                .HtmlAttributes(new { index = 2, id = "JobDocumentsTab" })
                .LoadContentFrom("GetJobLogTab", "TeamsV2", new { id = "JobDocumentsTab" });
        })
        .SelectedIndex(Model.SelectedJobLogTabIndex)
    )
</div>

And finally, the GetJobLogTab Action for the first tab is where I want to load the PanelBar.  I've tried this:

@if (SelectedJob != null)
{
    @(Html.Kendo().PanelBar()
        .Name("jobLogOverviewPanels")
        .ExpandMode(PanelBarExpandMode.Multiple)
        .Items(panelbar =>
        {
            panelbar.Add()
                .Text("Job Summary")
                .Expanded(true)
                .LoadContentFrom("GetJobLogOverviewContents", "TeamsV2", new { id = "JobSummary" });
        })
    )
}

Here's my controller action:

[HttpGet]
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "none")]
public ActionResult GetJobLogOverviewContents(string id)
{
    ViewBag.NewMode = false;
    TeamsV2Model Model = new TeamsV2Model(GetOrCreateSessionHelper(false));
 
    // The Partial views are in a folder of the same name
    return PartialView("JobLog/JobOverviewTab/Panels/" + id, Model);
}

 

I'm expecting the panels to load up straight away as I have set them to "Expanded" but they only load once I actually click the panel bar and then it loads the partial view into the whole screen and not into the tab?

I've attached an image containing the loaded pop-up window and then what happens when I click the panel bar.

 Any ideas?

Mark.

 

 

Dimo
Telerik team
 answered on 17 Dec 2015
1 answer
442 views

I cannot get Intellisense to work in my Razor views no matter what I try. I'm using Visual Studio 2015 and MVC 5. It has worked previously, but when I opened the project today it suddenly wasn't working. I have performed every single step in the introduction guide (reference added to the project, added to web.config), and I'm still getting the error below. I do have @using Kendo.Mvc.UI; at the top of my file, and the project builds so it's apparently finding the wrappers, but it won't enable Intellisense. I've removed/re-added the reference, closed/reopened the file and the solution, and rebooted my computer, but nothing has worked. What can I do to fix this?

ErrorCS0246 The type or namespace name 'Kendo' could not be found (are you missing a using directive or an assembly reference?)

Kiril Nikolov
Telerik team
 answered on 17 Dec 2015
1 answer
138 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
312 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
162 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
338 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
852 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
198 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
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
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?