Hi Team,
I am working on a Client-Side paging grid (ServerOperation(false)). However, the web still send a request to the server when I click the paging and sorting button. Also, the filter doesn't work. I can see the filter icon, but when I click on it, nothing happens.
My view:
@model IEnumerable<INSYNC_Test.Models.Staffs>
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
@(Html.Kendo().Grid(Model).Name("staffs").Columns(c =>
{
c.Bound(p => p.Firstname);
c.Bound(p => p.Lastname);
c.Bound(p => p.JobTitle);
})
.DataSource(d=>d
.Ajax()
.ServerOperation(false)
)
.Pageable()
.Filterable()
.Sortable()
)
My controller:
using INSYNC_Test.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace INSYNC_Test.Controllers
{
public class testController : Controller
{
// GET: test
public ActionResult Index()
{
var db = new OSHODSEntities();
var staffs = db.Staffs.Select(p => new Models.Staffs
{
ID = p.ID,
Firstname = p.Firstname,
Lastname = p.Lastname,
JobTitle = p.JobTitle,
locat = p.locat,
dept = p.dept,
status = p.status,
});
return View(staffs);
}
}
}
my viewmodel:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace INSYNC_Test.Models
{
public class Staffs
{
public int ID { get; set; }
public string Firstname { get; set; }
public string Lastname { get; set; }
public string JobTitle { get; set; }
public string locat { get; set; }
public string dept { get; set; }
public int status { get; set; }
}
}
<
a
href
=
"#"
id
=
"ic_open"
class
=
"tooltip2"
title
=
"Abrir"
>
<
span
title
=
""
>
<
img
class
=
"toolbar-icons"
src
=
"../../Images/open.png"
/>
</
span
>
</
a
>
...
<
div
id
=
"datagrid"
>
@(Html.Kendo().Grid(Model)
.Name("datagrid_Concessoes")
.Columns(columns =>
{
columns.Bound(c => c.Id).Width(70);
columns.Bound(c => c.Code);
columns.Bound(c => c.Description);
columns.Bound(c => c.CreationDate);
columns.Bound(c => c.CreationUser);
})
.HtmlAttributes(new { style = "height: 534px;" })
.Scrollable()
.Sortable()
.Selectable()
.Pageable(pageable => pageable
.Refresh(true)
.ButtonCount(5))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(15)
.Read(read => read.Action("GetConcessoes", "MasterData"))
)
)
</
div
>
<script type=
"text/javascript"
>
$(
function
() {
$(
'.tooltip2'
).click(
function
() {
var
id =
this
.id;
$.get(
'@Url.Content("GetPartialView")'
,
{
"id"
: id },
function
(data) {
$(
'#div-for-partial'
).html(data);
});
});
});
</script>
public
ActionResult GetPartialView(
string
id)
{
switch
(id)
{
case
""
:
return
PartialView(
"_Concessoes"
);
case
"tab1"
:
return
PartialView(
"_Concessoes"
);
case
"tab2"
:
return
PartialView(
"_AutoEstradas"
);
case
"ic_open"
:
return
PartialView(
"_NovaConcessao"
);
}
return
RedirectToAction(
"Index"
);
}
I have a form with multiple combo boxes, all have the same OnSelect event.
When I call the OnSelect I need to determine which combo box actually fired the event.
Here is my OnSelect function...
function combo_OnSelect(e) {
var dataItem = this.dataItem(e.item.index());
var control = $(this).val();
if (dataItem.Value == "Lookup") {
var dialog = $("#window_Lookup").data("kendoWindow")
dialog.center().open();
}
}
The bolded part throws an error, so what is the correct way to determine the combo box name?
Hi Support Team,
I created a series starting on 2016/1/1 recurrence rule "daily" and repeat every 3 days. January and February are OK.
But in march ​there is an entry on 2016/3/28 and 2016/3/29.
When I change the series to repeat every 4 days the last correct entry is 2016/3/25. The next entry is on 2016/3/30.
This seems to be a general problem in daily recurrence.
Is there a hot-fix?
Regards, David
Hi,
I have a checkbox that should have a tooltip, but the tooltip never shows. Can you help me find what I am doing wrong? KeepComputer is (of course) a boolean.
<tr>
<td>@Html.Kendo().CheckBoxFor(m => m.KeepAccessBadge)</td>
@Html.Kendo().Tooltip().For("#KeepAccessBadge").Content("Something...")
</tr>
On other elements I have identical tooltips and they are working just as expected.
Is there a work around for select all items in a Autocomplete text box?
Thanks in advance!
I'm developing a UI where the user can select from n stored procedures and view a chart for the resulting data. I need to develop a way to allow the user to configure a chart (for now I'm starting simple, bar/column/line chart only). I saw a prior post that said to look into scaffolding. I did, but still can't figure an intuitive way for the user to select the various axis and series. I'm hoping someone can point me to a working demo that allows the user to configure their chart elements.
Thanks in advance!
Steve.
@(Html.Kendo().Grid(Model)
.Name(
"assetTypeGrid"
)
.Columns(columns =>
{
columns.Bound(a => a.Type).ClientTemplate(@
"<img src='/Content/Images/Pins/#:data.Type#' style='height: 32px; weight: 32px;' />"
).Width(100);
columns.Bound(a => a.Description).Title(
"Name"
).Width(200);
columns.Bound(a => a.Tabs).Title(
"Available Tab(s)"
).Width(200);
columns.Bound(a => a.AssetTypeId).Title(
""
).Filterable(
false
).Sortable(
false
)
.ClientTemplate(createLink).Width(100);
})
.Sortable()
.Pageable(pageable => pageable
.ButtonCount(5))
.Filterable(ftb => ftb.Mode(GridFilterMode.Row))
.ClientDetailTemplateId(
"template"
)
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.ServerOperation(
false
))
)
<script id=
"template"
type=
"text/kendo-tmpl"
>
@(Html.Kendo().Grid<CIMSDashboard.ViewModels.AssetTemplateViewModel>()
.Name(
"grid_#=Name#"
)
.Columns(columns =>
{
columns.Bound(o => o.Types).Width(110);
columns.Bound(o => o.Name).Width(110);
columns.Bound(o => o.Description).Width(110);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Read(read => read.Action(
"GetAssetTemplates"
,
"AccessRetriever"
,
new
{ templateName =
"Pipe"
}))
)
.Pageable()
.Sortable()
.ToClientTemplate()
)
</script>
<script type=
"text/javascript"
>
$(document).ready(
function
() {
function
dataBound() {
this
.expandRow(
this
.tbody.find(
"tr.k-master-row"
).first());
}
});
</script>
public
static
List<AssetTemplateViewModel> GetAssetTemplates(
string
templateName)
{
using
(MiniProfiler.Current.Step(
"Getting Asset template Details"
))
{
var result =
new
List<AssetTemplateViewModel>();
using
(var context = ProfiledContext())
{
var query = from ta
in
context.tblTemplate_Assets
join at
in
context.tblAssetTypes on ta.AssetType equals at.Name
join atl
in
context.tblLink_AssetTypeToTemplate_Assets on ta.keyTempAssetID equals atl.fk_Template_AssetID
where atl.fk_AssetType == templateName
select
new
AssetTemplateViewModel()
{
Types = at.Logo,
Name = ta.Name,
Description = ta.Description
};
if
(query.Any())
{
foreach
(var q
in
query)
{
result.Add(q);
}
}
}
return
result;
}
}
The above read function is not being called.. am I missing something?? the layout of inner grid is coming perfectly, its all about data is not being displayed.. it is not reaching my break point in AccessRetriver at all... I've attached pictures of my output.. pls help me. Thank you in advance.
The recent update might have changed the behavior of the Grid Filter and their seems a slight bug in hovering of the Kendo Grid Filter TextBox with the Chrome.
Our Kendo Grid Deployed with MVC helpers throughout applications is now facing a slight bug in Chrome when we try to filter the grid column, the filter hides immediately as soon as we hover over to Textbox of Filter when default operator is not changed. If the operator is changed than the popup of the filer stays without any problem. The user has to use the Tab key enter the info in to the TextBox.
This Problem is not happening in Firefox but only Chrome.
The KendoMVC.dll version is 2016.3.914.545
Chrome version is Version 55.0.2883.87 m (64-bit)
Any Solution to this problem will be greatly appreciated.