Telerik Forums
UI for ASP.NET MVC Forum
1 answer
326 views
What is the correct way to use RenderPartial in a splitter?

@(Html.Kendo().Splitter()
  .Name("vertical")
  .Orientation(SplitterOrientation.Vertical)
  .Panes(verticalPanes =>
  {
      verticalPanes.Add()
          .Size("100px")
          .HtmlAttributes(new { id = "top-pane" })
          .Collapsible(false)
           
          .Content(
                @Html.RenderPartial("HeaderPartialView");
          );
Darron
Top achievements
Rank 1
 answered on 21 Feb 2014
3 answers
93 views
Custom Edit issue with Child Object.
I have a grid with a Custom Editor. The object that I want to edit has a child object.
When I select update in the editor it updates both objects.
If I select edit again on the same object it brings up the editor in the current state as expected.
This time when I select update in the controller it shows the data for the child object in the original state.

What I am looking for at this point is an example of using the grid and update that actually updates a child object.
I've see lots of examples that update the parent object, of display a child detail but nothing that actually updates both the parent and child.
Do I need to create a separate update on the child inside of my Custom Editor?
Vladimir Iliev
Telerik team
 answered on 20 Feb 2014
1 answer
191 views
Hello,

I use a panel bar to load content from a partial view which receives an id to display some informations based on it. Is it possible to reload a pane with different id using? I want something like this:

<script>
function loadDetails(id) {
      // get a reference to the panel bar
      var panelBar = $("#panelbar").data("kendoPanelBar");
      // reload the panel bar
      panelBar.reload("#paneWithAjax", new {id = id});
}
</script>

The panel bar has a pane  added with 
.LoadContentFrom("ShowDetails", "Controller", new {id = id})

Regards


Alexander Popov
Telerik team
 answered on 20 Feb 2014
1 answer
88 views
Hi, Is this possible?
Petur Subev
Telerik team
 answered on 20 Feb 2014
2 answers
218 views
I have a ListView control which uses a client template something like:

<script type="text/x-kendo-tmpl" id="paperlist-template">
  ...
  <div>${kendo.toString(PublicationDate, "dd MMMM yyyy")}</div>
  ...
</script>

If I construct the ListView using:

@(Html.Kendo().ListView(Model.Papers)...

everything works fine and the dates display correctly.  Model.Papers is an IEnumerable<PaperListItem>.  PaperListItem.PublicationDate is a C# DateTime.

However, if I construct the ListView using:

@(Html.Kendo().ListView<IEnumerable<PaperListItem>>()...

the dates come out like "/Date(1382050800000)/".

Why is that?
Barrie
Top achievements
Rank 1
 answered on 20 Feb 2014
1 answer
91 views
As the title says, the 'Justify' buttons on the editor don't work.  They show up, but when I click them, nothing happens.  All the other toolbar buttons work perfectly, it's only the justify buttons that have a problem.

Here's my editor configuration:
@(Html.Kendo().Editor().Name("Description")
 .Encode(true)
.Tools(t => t.Clear().Bold().Italic().Underline()
.FontSize().FontName()
.InsertOrderedList().InsertUnorderedList()
.Indent().Outdent()
.JustifyLeft().JustifyRight()
.JustifyCenter().JustifyFull()))

Kendo Version: 2013.3.1119
Browser: IE10
Alex Gyoshev
Telerik team
 answered on 19 Feb 2014
1 answer
221 views
Hi,

I have successfully implemented two multiselect list. List1 contains states and List2 contains counties. What I want to achieve is when I click on List2, it populate only with counties exist in selected states from List1.

Here is what I did;

1. Attached to open even on List2.
2. Wrote a JS function that cause datasource to update for List2 sending data. data is selected from List1.

    function open() {
        console.log("event: open");
        var values = {
            selectedStates: $("#stateMultiSelect").val()
        };

        var stateItem = $('#countyMultiSelect').data('kendoMultiSelect');
        stateItem.dataSource.read(values);
    };
The problem seems to be in model binding, I can see the request contains the data but at controller action it does not map to the model.

Controller Action:

        public JsonResult GetCounties(StateMultiSelectModel seletedStates)
        {
// seletedStates is alway null when breakpoint hits here.

            if (selectedStates == null)
            {
...
            }
...
}
Model
    public class StateMultiSelectModel
    {
        public List<string> SelectedStates { get; set; }
    }
Following is the request sent to controller.


Request URL:
http://localhost:61135/Dashboard/GetCounties?text=&SelectedStates%5B%5D=NC


In the same JS file I have chart controls that are getting updated on a button click using similar mechanism.
Please suggest changes. For your reference attached cshtml file that contain UI control code and JS.
Shailendra
Top achievements
Rank 1
 answered on 18 Feb 2014
2 answers
195 views
Hi,

I've been using Kendo UI with ASP.NET MVC and am very happy with it.
Still, I'm stuck with an issue:

I have an EditorTemplate which ouputs a Kendo UI DropDownList. As a best practice, I call .Deferred() on every widget I'm using to get all the JS initialization at the bottom of the page.
The issue I'm facing is that this EditorTemplate is used by the grid to build insert and edit popup forms, and in this case the .Deferred() does not work because the intialization script is executed before the grid actually builds the form.

What I'd like to achieve to avoid duplicating the EditorTemplates is to know, at runtime, whether the template is executed from a "normal" page or from a Kendo form builder.
I saw that you create your own HtmlHelper, passing along a GridViewDataContainer, but at runtime I'm always faced with the Html.ViewDataContainer being an instance of WebViewPage.

Do you know if there's a possibility of figuring this out so I can defer the JS scripts when appropriate?

Thanks in advance.
Mickaël Derriey
D.
Top achievements
Rank 1
 answered on 18 Feb 2014
2 answers
157 views
I am an experienced asp.net web forms developer, new to the Kendo UI.  I have a reasonable grasp on things, but sometimes feel I am I groping around in the dark!  :-)

So here is my issue...

I have a panel bar with eight root level items, each of these containing 1-5 child items.  All of these items, both parent and child contain both an image and text.  I have added a toggle button to my view that will grow or shrink the width of the panel bar, depending on the button state when clicked.  That much I was able to glean from various forum post.  What I need to know now is how to modify the root and/or child item text when growing (restore text) or shrinking (remove text) the panel bar.

Thanks in advance for any help you can give!

Barry

Barry Burton
Top achievements
Rank 1
 answered on 18 Feb 2014
11 answers
1.4K+ views
Hi,

We are observing the following issue related to the time differences between our MVC app and a Kendo DatePicker. The web server is running in UTC+0. The web clients are running in different time zones (UTC+1, UTC+3, UTC-5, etc.)

The web page contains a Kendo date picker (no time portion) where user selects a single day or a month. Behind the scenes The date is sent in an AJAX request using full Date objects which contain the time and timezone information. 

We are only interested in the date portion irrespective of the time zone that client is in. When a user selects a date/month we want to receive a C#
DateTime object in the local server time.

For example:

User is in UTC+1 and selects ‘01/07/2013’ 
The actual C# DateTime object is instantiated as ‘30/06/2013 23:00’
We expect to get â€˜01/07/2013 00:00:00’

We are currently using the following setting in Global.asax :

GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.DateTimeZoneHandliig = Newtonsoft.Json.DateTimeZoneHandling.Local;

Could you please advise?
Douglas
Top achievements
Rank 1
 answered on 17 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?