Telerik Forums
UI for ASP.NET MVC Forum
1 answer
292 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
365 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
89 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
238 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
136 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
293 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
806 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
97 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
89 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
63 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
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
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?