@(Html.Kendo().Editor() .Name("Editor") .HtmlAttributes(new { style = "width: 740px;height:440px" }).ImageBrowser(imageBrowser => imageBrowser .Image("~/Content/UserFiles/Images/{0}") .Read("Read", "ImageBrowser") .Create("Create", "ImageBrowser") .Destroy("Destroy", "ImageBrowser") .Upload("Upload", "ImageBrowser") .Thumbnail("Thumbnail", "ImageBrowser")))Anybody else have this problem?
Any help would be appreciated!
Visual Studio Premium 2012
Package Installation Error
The "repository" attribute of the package element has an invalid value:
'registry'. Valid values are 'template', or 'extension'
Thanks!
I'm just building my first kendo app - and my first mvc app, for that matter - and am stuck on one piece. The page has a kendo grid that is populated using the View's model. Above the grid is a search form, which triggers a "Search" controller action. That action uses any criteria to get a new set of data and passes it back to the View, but the grid doesn't automatically re-bind to the data. I'm not sure how to re-bind the grid, but if there is a way, where would I do it - in the View or the controller action?
Here is my code - Grid:
@(Html.Kendo().Grid(Model) .Name("tblGrid") .Columns(columns => { columns.Bound(w => w.Id).Hidden(); columns.Bound(w => w.IncidentType).Width(160); columns.Bound(w => w.Location).Width(180); columns.Bound(w => w.IncidentDateTime).Width(120).Format("{0: MM/dd/yyyy H:mm tt}"); columns.Bound(w => w.PostDateTime).Width(120).Format("{0: MM/dd/yyyy H:mm tt}"); }) .DataSource(dataSource => dataSource .Server() .Model(model => model.Id(w => w.Id)) .PageSize(15) .Create("Editing_Create", "Grid") ) .Events(events => events.Change("gridChange")) .Groupable() .Pageable() .Sortable() .Selectable() .Resizable(builder => builder.Columns(true)) )Search Controller:
[HttpPost]public ActionResult Search([DataSourceRequest] DataSourceRequest request, string location, string reportNum, int? officerId, int? xref, int? days, int incidentTypeId){ var summaries = new List<WatchSummaryInfo>(); try { summaries = WatchSummaryBL.DoGetWatchListBySearch(SearchCriteriaHere).ToList(); } catch (Exception ex) { throw new Exception(ex.Message); } var filtered = new List<WatchSummaryViewModel>(); try { foreach (var summary in summaries) { filtered.Add(new WatchSummaryViewModel{ Id = summary.ID, IncidentDateTime = summary.WatchDateTime, IncidentType = summary.IncidentType, Location = summary.Location, PostDateTime = summary.PostDateTime }); } } catch (Exception ex) { throw new Exception(ex.Message); } return View("List", filtered);}I can verify by stepping through this that the collection I am passing back to the View has a much smaller subset (11) than the original ViewModel data, but the grid doesn't change.
What am I missing?
Thanks for the help!
Eddie
Is there a way to disable column resizing for a particular column only (the last column to be precise)?
Some more info on my problem, I have enabled fixed table layout on the Grid, so that an Ellipsis will show for fields that are very long.
/* allow ellipsis to show on overflow text in grid */
.k-grid table
{
table-layout:fixed;
}
... but now when the user resizes the last column, there are rendering issues on the Grid - it overruns the width of the grid (see attachment).
Here is my grid def -
@(Html.Kendo().Grid(Model)
.Name("Grid")
.Columns(columns =>
{
columns.Bound(p => p.RoleName).Width(200);
columns.Bound(p => p.Description);
})
.Events(events => events.Change("Grid_OnRowSelect"))
.Pageable()
.Sortable()
.HtmlAttributes(new { @style = "width:500px" })
.Selectable(s => s.Mode(GridSelectionMode.Single))
.Resizable(resize => resize.Columns(true))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("RoleSearch", "Role").Data("Grid_OnData"))
.Events(e => e.RequestEnd("Grid_OnRequestEnd"))
)
)