Telerik Forums
UI for ASP.NET MVC Forum
6 answers
446 views
Hi there
I want to create a nice admin panel to creating my new post from on with these item :
1-post title
2-post body
3-post date&time
4-post comment
and some more
now does telerik have any component to help me to creating this admin panel ?
Best Regards
Raha
Dimo
Telerik team
 answered on 04 Feb 2014
3 answers
460 views
I was trying to use the LoadContentFrom() of Kendo Window like this:

Html.Kendo().Window()
	   .Name("time-hierarchy-edit-window")
	   .Title("Add or Edit Leafs")
	   .LoadContentFrom("/Hierarchies/EditTimeHierarchyNodes?hierarchyID=" + Request.QueryString["hierarchyID"])
	   .Draggable()
		.Width(500)
		.Render();

And I have the action method in controller:

public ActionResult EditTimeHierarchyNodes(Guid hierarchyID)
		{
			EditTimeHierarchyNodesViewModel model = new EditTimeHierarchyNodesViewModel() {
				Hierarchy = m_timeHierarchyRepository.GetTimeHierarchy(hierarchyID),
				LeafNodeGroups = m_timeNodeRepository.GetLeafNodeGroups(hierarchyID),
			};
 
			return View();
		}
However, when the ajax request came back, it gave me 500 error "This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet." The issue is that the View() does not have any overload that allows me to specify the AllowGet option. Can any one shine some light on this? Thanks.

mark
Top achievements
Rank 1
 answered on 04 Feb 2014
2 answers
83 views
I would like to do something similar to the Batch editing example found here: http://demos.telerik.com/kendo-ui/web/grid/editing.html

However, several pieces of the configuration cause my page to never finish loading.  Accessing the page will cause the loading icon to appear in the tab of my web browser, but the page never finishes.  The Index method of my page is hit, and returns the View, but the Read AJAX method is never called, and the display never updates.

Adding the following things to the configuration causes this issue for me:
in .Columns:
    columns.Command(command => command.Destroy()).Width(110);
.ToolBar(toolbar => {
            toolbar.Create();
            toolbar.Save();
        })
.Editable or
.Editable(editable => editable.Mode(GridEditMode.InCell))

For example, this produces a read-only grid:
@(Html.Kendo().Grid<AccountManagement.Business.ViewModels.Areas.DM.RehireDocumentSettingViewModel>()
                    .Name("DocumentSettings")
                    .Columns(columns => {
                            columns.Bound(ds => ds.FormID);
                            columns.Bound(ds => ds.DocumentDateTypeName);
                            columns.Bound(ds => ds.RemoveIfOlderThanDays);
                        }
                    )
                    .Navigatable()
                    .Sortable()
                    .Scrollable()
                    .DataSource(dataSource => dataSource
                        .Ajax()
                        .Batch(true)
                        .ServerOperation(false)
                        .Events(events => events.Error("error_handler"))
                        .Model(model => model.Id(ds => ds.FormID))
                        .Create("RehireDocumentSetting_Editing_Create", "RehireSetup")
                        .Read("RehireDocumentSetting_Editing_Read", "RehireSetup")
                        .Update("RehireDocumentSetting_Editing_Update", "RehireSetup")
                        .Destroy("RehireDocumentSetting_Editing_Destroy", "RehireSetup")
                    )
                )

And this produces the issue:
@(Html.Kendo().Grid<AccountManagement.Business.ViewModels.Areas.DM.RehireDocumentSettingViewModel>()
                    .Name("DocumentSettings")
                    .Columns(columns => {
                            columns.Bound(ds => ds.FormID);
                            columns.Bound(ds => ds.DocumentDateTypeName);
                            columns.Bound(ds => ds.RemoveIfOlderThanDays);
                        }
                    )
                    .Navigatable()
                    .Sortable()
                    .Scrollable()
                    .Editable()
                    .DataSource(dataSource => dataSource
                        .Ajax()
                        .Batch(true)
                        .ServerOperation(false)
                        .Events(events => events.Error("error_handler"))
                        .Model(model => model.Id(ds => ds.FormID))
                        .Create("RehireDocumentSetting_Editing_Create", "RehireSetup")
                        .Read("RehireDocumentSetting_Editing_Read", "RehireSetup")
                        .Update("RehireDocumentSetting_Editing_Update", "RehireSetup")
                        .Destroy("RehireDocumentSetting_Editing_Destroy", "RehireSetup")
                    )
                )

I don't get any error messages in Visual Studio or the browser, or any indication of what is going on.

Any help would be appreciated.
Brian
Top achievements
Rank 1
 answered on 03 Feb 2014
2 answers
66 views
I'm using the panelbar to display links to different internal applications that I have grouped together into several different sections on a password protected intranet.
I really like that the links for actions are not displayed when a user does not have acquitted permissions to execute them.

However I'm left with top level items without any child items that are displayed. Is there a simple way to hide the top level items without any children?

Benjamin
Top achievements
Rank 1
 answered on 03 Feb 2014
1 answer
46 views
I created a ticket for this... but thought someone in the community might have an idea. 24 hours is a long time to wait.

I just upgraded from Q3 2013 to Q3 2013 SP2. The grid headers in chrome are rendering with extra line in the header. See attachment:

When I inspect element in chrome I see this style

.k-grid-header .k-header>.k-link {display: block;

If I turn that off or set it to inline-block the issue goes away. The strange thing is that the demos that style is there and it renders correctly. 

I've verified the correct styles/script versions are coming from the cdn:

<link href="//da7xgjtj801h2.cloudfront.net/2013.3.1324/styles/kendo.common.min.css" rel="stylesheet"/>

<link href="//da7xgjtj801h2.cloudfront.net/2013.3.1324/styles/kendo.blueopal.min.css" rel="stylesheet"/>

<script src="//da7xgjtj801h2.cloudfront.net/2013.3.1324/js/kendo.all.min.js"></script>

<script src="//da7xgjtj801h2.cloudfront.net/2013.3.1324/js/kendo.aspnetmvc.min.js"></script>

Anyone have any ideas. I can just change the style but I don't understand the ramifications of that on every other browser. 

BTW: This seems to work fine as is in IE10/11 and FireFox without changing the style.

Thanks,
BOb


Dimo
Telerik team
 answered on 03 Feb 2014
1 answer
406 views
Hi All,

I am new to MVC. Can some provide me an example program or the web link through which I can understand how to apply the Bootstrap style (responsive style) to Kendo UI ListView for MVC 5.

Thank you.
Atanas Korchev
Telerik team
 answered on 03 Feb 2014
5 answers
241 views
I have a tab strip with three tabs, two of which load from partial views and each contains one or two Kendo Drop Downs.

When I click on the tabs with the drop downs the first time, they work fine.  But when I go back to the tab, the drop downs do not appear.

Ideas?
Vladimir Iliev
Telerik team
 answered on 31 Jan 2014
1 answer
192 views
Selected Item in Dropdown list of ClientDetailTemplate Kendo UI Grid changes only in Edit mode but the selected value does not retain in the read mode..

Below is the code for the grid which uses ClientDetailTemplate that contains another grid with editable dropdown list column.The issue I am facing is the the dropdown list in the second grid doesn't reflect the selected value after selection is made in the edit mode..
Not sure how to make the dropdownlist work correctly when added inside a grid under clientDetailTemplate..


 @{Html.Kendo().Grid(Model.lst)
          .TableHtmlAttributes(new { Class = "someBoldClass" })
    .Name("grd1")
    .Columns(columns =>
    {
        columns.Template(e => { }).ClientTemplate(" ").Title("Phase").Width(85);
        columns.Template(e => { }).ClientTemplate(" ").Title("Methodology").Width(110);       
    })
    .Editable(editable => editable.Mode(GridEditMode.InCell))
    .Events(e => e
        
        .DataBound("db")
    )
    .HtmlAttributes(new { style = "height:350px;width:100%;" })
    .ClientDetailTemplateId("ActivitiesTemplate")
    .Selectable(select => select.Enabled(true).Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
    .DataSource(datasource => datasource
    .Ajax()
     .Model(model =>
     {
         model.Id(p => p.EmpID);
         model.Field(p => p.Name).Editable(false);
     }
    )
    .PageSize(5)
    .Read(read => read.Action("PersonContractor_Read", "AUMgr"))
    .Model(model => model.Id(p => p.EmpID)))
    .Pageable(p => p.Enabled(true))
    .Filterable()
    .Sortable()
    .Scrollable()
    .Navigatable()
    .Render()
    ;
    }




<script id="ActivitiesTemplate" type="text/kendo-tmpl">
    @(Html.Kendo().Grid<RMMockup.Models.Project>()
        .Name("GridDetails" + "#=UniqueId#")
        .Columns(columns =>
        {        
            columns.Bound(p => p.Phase).ClientTemplate("<div>#=Phase.PhaseName#</div>").Width(95);
            columns.Bound(p => p.Methodology).ClientTemplate("#=Methodology.MethodologyName#").Width(110);

})
        .Editable(editable => editable.Mode(GridEditMode.InCell))
        .Sortable()
        .Selectable(select => select.Enabled(true).Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
        .HtmlAttributes(new { style = "height:100%;width:100%;" })
        .Scrollable(scroll => scroll.Enabled(true))
        .Filterable()
        .Events(e => e.DataBound("dbActivities"))
        .Pageable(page => page.Enabled(false))
        .DataSource(dataSource => dataSource

        .Ajax()
                .Read(read => read.Action("GetActivities", "AUMgr", new { ProjectID = "#=ProjectID#", PersonId = "#=EmpID#" }).Type(HttpVerbs.Post))
                .Model(model => 
                {
                    model.Id(p => p.ProjectID);
                    model.Field(p => p.Phase).DefaultValue(ViewData["phase"] as RMMockup.Models.Phase);
                    model.Field(p => p.Methodology).DefaultValue(ViewData["methodology"] as RMMockup.Models.Methodology);
                })
        )
        .ToClientTemplate()
             )
</script>
Vladimir Iliev
Telerik team
 answered on 31 Jan 2014
1 answer
35 views
Please see attachment, our editor looks out of whack.  Thanks.

<div class='tab-content k-widget'><br>            @Html.ValidationSummary()<br>    <br>            @using (Rite.FormTable())<br>            {<br>                using (Rite.FormColumn(classCss: "editorWidth"))<br>                {<br>                    @(Html.Kendo().Editor()<br>                                .Name("Message")<br>                                .HtmlAttributes(new<br>                                      {<br>                                          @class = changeTrack,<br>                                          data_bind = "value: Message",<br>                                          style = "width: 800px; height:600px",<br>                                      })<br>                                .Tools(t => t.Clear()<br>                                          .Bold()<br>                                          .Italic()<br>                                          .Underline()<br>                                          .FontColor()<br>                                          .FontName()<br>                                          .FontSize()<br>                                          .JustifyLeft()<br>                                          .JustifyCenter()<br>                                          .JustifyRight()<br>                                          .JustifyFull()<br>                                          .InsertUnorderedList()<br>                                          .InsertOrderedList()<br>                                          .Indent()<br>                                          .Outdent()<br>                                          .CreateLink()<br>                                          .Unlink()<br>                                          .SubScript()<br>                                          .SuperScript()<br>                                          .InsertImage()<br>                                        )<br>                    )<br>                }
Iliana Dyankova
Telerik team
 answered on 31 Jan 2014
6 answers
107 views
Hi
After updating to the latest version the grid fails to add additional data.
I have this datasource definition:
 .DataSource(dataSource => dataSource
                  .Ajax()
                  .Events(events => events.Error("error_handler").RequestEnd("OnRequestEnd"))
                  .Batch(true)
                  .PageSize(15)
                  .Sort(s => s.Add("SentDate").Descending())
                  .Model(model =>
                  {
                      model.Id(p => p.Id);
})
                  .Read(read => read.Action("GetPayDayMessages", "Message").Data("GetFilterData"))
                  .Update(update => update.Action("UpdateMessages", "Message"))
                  .ServerOperation(true)
              )
My javascript method looks like this:
<script type="text/javascript">
    function GetFilterData() {
        return {
            Closed: $("#ChkShowClosed").prop('checked'),
            ShowWaitingForClose: $("#ChkShowWaitingForClose").prop('checked')
     };
 }
 </script>
The GetFilterData is called but the data is never added to the call to the server. 
This worked fine in the previous version.
Can i make some change to make it work ?
Daniel
Telerik team
 answered on 31 Jan 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?