I am about to plan a purchase with a new customer again for the suite and I am using the latest demo. I was trying to get the value from the form that I placed my control in. I need to gain access in this field .DataValueField("Id") which would be bound to the form when its posted but when I access tag item its null
<
form
asp-action
=
"LinkToCase"
asp-controller
=
"MISObjects"
>
<
div
class
=
"row"
>
<
div
class
=
"col-md-12"
>
<
div
class
=
"card card-success"
>
<
div
class
=
"card-header"
style
=
"background-color:#1e3f5a;color:white"
>
<
h3
class
=
"card-title"
>Search and Tag</
h3
>
</
div
>
<
div
class
=
"card-body"
>
<
div
class
=
"col-md-12"
>
<
div
class
=
"input-group"
>
<
select
id
=
"searchOptions"
name
=
"searchOptions"
style
=
"background-color: #1e3f5a; color: white; width: 140px; height: 45px"
>
<
option
selected
value
=
"1"
>Poi</
option
>
<
option
selected
value
=
"1"
>Vessel</
option
>
</
select
>
@(Html.Kendo().MultiColumnComboBox()
.Name("tagItem")
.DataTextField("name")
.DataValueField("Id")
.Filter("contains")
.FilterFields(new string[] { "name", "ContactTitle", "CompanyName", "Country" })
.Columns(columns =>
{
columns.Add().Field("name").Title("Contact Name").Width("200px");
columns.Add().Field("dob").Title("Date Of Brith").Width("200px");
})
.FooterTemplate("Total #: instance.dataSource.total() # items found")
.HtmlAttributes(new { style = "width:80%;" })
.Height(400)
.DataSource(source => source
.Custom()
.Transport(transport => transport
.Read(read =>
{
read.Action("SearchQuery", "MISObjects")
.Data("onAdditionalData");
}))
)
)
<
button
class
=
"btn-primary"
value
=
"Link To Case"
style
=
" background-color:#1e3f5a;color:white"
>Link To Case</
button
>
</
div
>
<
script
>
function onAdditionalData() {
return {
text: $("#customers").val()
};
}
</
script
>
public IActionResult LinkToCase(int tagItem, string sesearchOptionsr) {
Int32.TryParse(TempData.Peek("CaseId").ToString(), out int resultCaseId);
POI newPoi = new POI();
newPoi = _context.Pois.SingleOrDefault(w => w.Id == tagItem);
newPoi.MISObjectId = resultCaseId;
_context.Pois.Add(newPoi);
_toast.AddSuccessToastMessage(
$"You have linked {newPoi.FirstName} {newPoi.LastName} to case {resultCaseId:d8}");
return RedirectToAction("Edit", new { id = resultCaseId });
}
I have a grid with a details panel.
The details panel has the following template:
<
script
id
=
"SuggestionGridDetailsTemplate"
type
=
"text/kendo-tmpl"
>
@(Html.Kendo().Splitter()
.Name("sug-splitter-#=SuggestionID#")
.HtmlAttributes(new { style = "height: 500px;" })
.Orientation(SplitterOrientation.Vertical)
.Panes(verticalPanes =>
{
verticalPanes.Add()
.HtmlAttributes(new { id = "sug-top-#=SuggestionID#" })
.Collapsible(false)
.Size("#if(Status == 0){#54px#}else{#100px#}#")
.Content(@<
div
class
=
"container"
>
<
div
class
=
"row"
>
#if(Status == 0){#
<
div
class
=
"col-2 offset-10 float-right"
>
@(Html.Kendo().Button()
.Name("DeleteSuggestionBtn-#=SuggestionID#")
.HtmlAttributes(new { type = "button", @class = "k-btn-danger mt-2 float-right" })
.Events(e => e.Click("DeleteSuggestionBtnClick"))
.Content("Delete").ToClientTemplate())
</
div
>
#} else {#
<
div
class
=
"col-4"
>
<
label
>Actioned by:</
label
>
<
p
>#=ActionedBy#</
p
>
</
div
>
<
div
class
=
"col-8"
>
<
label
>Comments:</
label
>
<
p
>#=Comments#</
p
>
</
div
>
#}#
</
div
>
</
div
>);
verticalPanes.Add()
.HtmlAttributes(new { id = "sug-bottom-#=SuggestionID#", @class="iv-pane-no-overflow" })
.Resizable(false)
.Collapsible(false);
}).ToClientTemplate()
)
</
script
>
The grid has a DetailExpand event that will populate the bottom pane of the "sug-splitter" with a partial view from the controller using AJAX. The content all loads, but the script generated to make the splitter look like a splitter does not fire. If I copy the jQuery call into the console and run it, the splitter turns into what I am expecting.
<
script
>kendo.syncReady(function(){jQuery("#vertical-18b41377-7c46-4e83-b72c-84e9a6589135").kendoSplitter({"panes":[{"collapsible":false,"scrollable":false},{"collapsible":false,"resizable":false,"size":"100px"}],"orientation":"horizontal"});});</
script
>
I have loaded content with a splitter in it previously, although this was into a window, not a grid details area.
What can I do to get the splitter to load and not just be a bunch of divs on page?
I've ported my app from .NET Framework MVC to .NET Core 3.1. The Kendo Grid displays OK and fetches data from the controller successfully (no javascript console errors). However despite the fact that 10 records are returned, the grid isn't actually rendering any rows. What could I be doing wrong?
Controller:
public
ActionResult FetchUsers([DataSourceRequest] DataSourceRequest request)
{
var cardivationApi = GetCardivationApi();
var data = cardivationApi.GetUsersFiltered(request);
return
new
JsonResult(data);
}
View:
@(Html.Kendo().Grid<
UserDtoV1
>().Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.FirstName).Title(DbRes.T("FirstName", "Labels"))
.Filterable(t => t.Cell(cell => cell.Operator("startswith").SuggestionOperator(FilterType.StartsWith).Delay(9999))
.Operators(o => o.ForString(d => d.Clear().StartsWith(DbRes.T("StartsWith", "Labels")).Contains(DbRes.T("Contains", "Labels"))))
.Extra(false));
[ cut for brevity ]
.Pageable(p => p.PageSizes(true).PageSizes(new[] { 10, 20, 50, 100 }).Messages(t => t.ItemsPerPage(DbRes.T("ItemsPerPage", "Labels"))))
.Filterable(ftb => ftb.Mode(GridFilterMode.Menu))
.HtmlAttributes(new { style = "min-height:500px;" })
.ProxyURL(Url.Action("ExcelExport", "Users"))
)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.ServerOperation(true)
.Read(read => read.Action("FetchUsers", "Users"))
.Model(model => model.Id(t => t.UserID))
)
)
Thanks,
Nick
I am trying to put in a panel bar that is collapsed by default. I took the demo and changed the expanded value to false.
<
kendo-panelbar
name
=
"project"
>
<
items
>
<
panelbar-item
text
=
"Storage"
expanded
=
"false"
>
<
items
>
<
panelbar-item
text
=
"Wall Shelving"
></
panelbar-item
>
<
panelbar-item
text
=
"Floor Shelving"
></
panelbar-item
>
<
panelbar-item
text
=
"Kids Storag"
></
panelbar-item
>
</
items
>
</
panelbar-item
>
</
items
>
</
kendo-panelbar
>
The panel bar items are collapsed but the icon is set to "k-i-arrow-60-up" so it looks like it can still be collapsed.
I am also wanting to put content other than <panelbar-item> in there, so I was going to use the <content> tag instead f the <items> tag an then put a treeview in there. When I use the <content> tag, the content is always show, so I must be using this incorrectly. I know I can do it with the html helpers, but I like how the tag helpers look. Can I still do this with the tag helpers?
Hi everybody
I have a problem with kendo treeview checkboxes
i populated treeview with remote data, it binds correctly. I used "checked" property to send checked checkboxes to view, it works fine too.
i use 2 different method for sending checked node IDs to controller but does not work properly.
method1:
use java script to read nodes recursively and gather IDs then store in hidden field and send to controller but most of the times some nodes doesn't illustrate the check items thoroughly. in other words, I lose near half of checkboxes randomly.
method2:
using checkbox name and template and send checkboxes directly to the controller got same issue.
what can i do for this issue??
thanks
I am attempting to add an āAllā option to the page size dropdown in a gridās pagination so that the grid can display all items if needed.
Prior to updating to version R2 2020 we called a script that checked the page size <select> to see if āAllā was present as an option. If not it would insert the text and value for the option. It was based on the method described here: Set All Page Size in Grid for ASP.NET Core. This no longer seems to work since the Pager component was updated. What would be the R2 2020 friendly version of that solution? Because calling that scripting breaks the gridās Pager now and the buttons appear disabled with no change to the page size dropdown.
Currently in Splitter, when adding a new pane, I can use LoadContentFrom("Action","Controller") to load content
For a TitleLayout, when adding a new container, I can only use BodyTemplateId("stringTemplateID")
Is there a way for me to simulate BodyTemplateId ("Action","Controller") to load data into TitleLayout from a Controller/Action?
Thanks.
Hi,
How can I change the default color for all highlighting , hover & mouse - over for an application.
I want to display 4 or 5 columns and 3 or 4 columns that are hidden in the grid. I want to create a custom command to show the all the columns in a readonly fashion.
Basically, use the default dialog for popups and make it readonly. Can it be done?
Thanks ⦠Ed