Telerik Forums
UI for ASP.NET MVC Forum
1 answer
172 views
I have a timeline Month view with many resources on the left column. When user scrolls down, they can't see the day because the top disappears. Is it possible to freeze the top row?
Vladimir Iliev
Telerik team
 answered on 23 Dec 2015
2 answers
347 views

I have a grid which has inline editing with one field visible (a date field).

 

For some reason when I press edit on a row and then cancel (on any row apart from the top row) the whole row turns into the value of the top item.

No data is saved to the database as refreshing the grid shows the correct values again.

 

I've put in an event handler to see what's being happening when cancel is pressed and it seems by the time the cancel event is hit, the object that gets returned is the first item of the grid.

 

How can I stop this behaviour from happening?

Dimiter Madjarov
Telerik team
 answered on 22 Dec 2015
1 answer
246 views

Hi,
I want to see only one series visible on page load. I have dynamically loading the series:

.Series(series =>
    {
       foreach (var def in Model.Series)
       {
             series.Column(def.Value).Name(def.Years);

              //.Visible(just year "2014")
       }
     })

Thanks,

Victor

Iliana Dyankova
Telerik team
 answered on 22 Dec 2015
2 answers
375 views

Working w/a C# MVC Project that displays a Company's information if the user chosen from a ComboBox EXISTS.  One of the data fields displayed is the Company's State which is itself a ComboBox:

@(Html.Kendo().ComboBox()
                            .Name("CompanyState")
                            .Placeholder("Select a state...")
                            .BindTo((List<string>)ViewBag.StateNames)
                            .Value("NV")
                            .Suggest(true)
                        )

Note that when the ComboBox is first created, its data source is bound to the List in "ViewBag.StateNames". 

When the data is displayed, I DISABLE the "CompanyState" ComboBox as there is no need for the App User to enter the data.

$("#CompanyState").kendoComboBox({ enabled: false });

My problem is when I need to ENABLE the "CompanyState", I lose the binding to the List in "ViewBag.StateNames". My question then is: how can I rebind to that List?

Aaron
Top achievements
Rank 1
 answered on 21 Dec 2015
1 answer
171 views

Hi there,

I'm using a NumericTextBox to edit a number with variable (unknown) number of decimals but I don't know how to show all the decimals because by default the NumericTextbox is rounding the number to two decimals.

To partially solve the solution I did the following

1.html.Kendo().NumericTextBox()
2.    .Name("asdf")
3.    .Format("#.#############")
4.    .Decimals(10)

But in this way I'm limiting the number of decimals to 10.

Is there a way to show all the decimals in the NumericTextBox?

Thank you,

Jack.

Dimiter Topalov
Telerik team
 answered on 21 Dec 2015
4 answers
235 views

Is there a recommended way of handling a ContextMenu in a Partial View?

I have a partial view for each tab in a TabStrip (loaded via LoadContentFrom).

Each time the partial view is loaded, the ContextMenu element (<ul>) is moved to the bottom of the page within a div with class "k-animation-container". The menu behaves correctly on first load (items can be hidden successfully). On subsequent loads, the whole menu is displayed. This is presumably because of the duplicate <ul> and <li>s with duplicate ids.

Is this an incorrect usage?  Should I be destroying the widget each time (like in the example with the "Apply" dropdown to change orientation).

 

Dimiter Madjarov
Telerik team
 answered on 21 Dec 2015
1 answer
87 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
556 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
278 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
335 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?