Hello,
After spending a couple of hours trying to figure out why my custom popup editor template was failing with this javascript error in the kendo.all.min.js file: "0x800a03f1 - JavaScript runtime error: Expected '}' "
it turned out to be an inline javascript comment that was causing the error. I have a script tag at the top of my template with a couple of javascript functions and in them are some single-line comments using the '//' syntax. When I remove those the popup editor works just fine and when I put them back in it throws the error. Why is this happening? Is this a known issue? Is it documented anywhere?
Thanks,
Mike
I have a grid which looks good on until 1400 screen resolution but if i try to go less than that, i don't see right most columns. I don't want to use vertical scroll bar, so I have used this
.Scrollable(s => s.Height("auto"))
But even this, slight changed my grid look. column width changed. I have attached some screen shots so that you can see the difference
Hi,
robert

I have an issue when i tried to show more than one grid in the view.
This is my first grid that works fine.
@model IEnumerable<CampeonatoFutbol.Models.PartidoClub>
@(Html.Kendo().Grid(Model)
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.ClubDesc).Title("EQUIPO").Width(220);
columns.Bound(c => c.PrtidoCodigo).Title("PJ").Width(60);
columns.Bound(c => c.GolesClub).Title("GC").Width(60);
columns.Bound(c => c.PuntosClub).Title("PUNTOS").Width(150);
})
.HtmlAttributes(new { style = "height: 300px;" })
.Scrollable()
.Reorderable(reorder => reorder.Columns(true))
.Pageable(pageable => pageable
.PageSizes(true))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
)
)
And this the method action of the controller that render the html of that grid.
public ActionResult Campeonato()
{
//return a list for the grid
}
and whe i tried to put another grid in the same view, the second grid doesn´t show me anything
This is the second grid that i tried to use:
@(Html.Kendo().Grid<CampeonatoFutbol.Models.PartidoClub>()
.Name("gridGoleadores")
.Columns(columns =>
{
columns.Bound(c => c.NombreJugador).Title("JUGADOR").Width(220);
columns.Bound(c => c.ClubDesc).Title("EQUIPO").Width(60);
columns.Bound(c => c.GolesJugador).Title("GOLES").Width(60);
})
.HtmlAttributes(new { style = "height: 300px;" })
.Scrollable()
.Reorderable(reorder => reorder.Columns(true))
.Pageable(pageable => pageable
.PageSizes(true))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("GoleadoresCampeonato", "Campeonato"))
.PageSize(20)
)
)
And this is the method action that it's never called:
public ActionResult GoleadoresCampeonato([DataSourceRequest]DataSourceRequest request)
{
return Json(list.ToDataSourceResult(request) )
}
I hope someone can helpme whit this.
|
Requirements |
|
|
Telerik Product and Version |
2014.3.1411.440 |
|
Supported Browsers and Platforms |
GoogleChrome |
|
Components/Widgets used (JS frameworks, etc.) |
UIGrid |
PROJECT DESCRIPTION
[enter description here, together with step-by-step instructions on how to use the project]
We have several pages where we have noticed that the sorting of the grid is not working. We are attempting to sorty by four columns but to no luck we are able to get the desired results.. Attached is a sample of the binding as well as the controller method that retrieves the method.
I have tried binding it both in the controller using OrderBy, ThenBy extensions as well as the sort in the grid binding. Additionally I have also sorted the results within the method that the controller calls and have reviewed it with LinqPad and it appears to be sorting correctly. However I cannot get it bind sorted in the grid. Any help will be appreciated.
Grid Binding
Scrollable(a => a.Height("auto")) .Sortable() .PrefixUrlParameters(false) .Filterable() .Pageable(pageable => pageable .Refresh(true) .PageSizes(new[] { 50, 100, 250, 500, 1000 }) .Messages(messages => messages.ItemsPerPage(" items are currently displayed")) .ButtonCount(5)) .DataSource(dataSource => dataSource .Server().PageSize(250) .Sort(s => { s.Add(c => c.EAN).Ascending(); s.Add(c => c.IngramSku).Ascending(); s.Add(c => c.BusinessYear).Descending(); s.Add(c => c.BusinessMonth).Descending();
Controller Method Logic
var viewModel = new ViewModels.RAM.VendorQuarterlyRevenueViewModel() { VendorId = vendorId, VendorName = GetVendorName(vendorId), sort = sort, filter = filter, group = group, ShowDataGrid = true, ReportDate = new ViewModels.RAM.ReportDateViewModel() { BeginDate = beginDate, EndDate = endDate, MaxDate = maxDate, MinDate = minDate, }, VendorQuarterlyRevenueData = _ramReportRepository.GetVendorQuarterlyRevenue(_ramReportRepository.GetContext(), beginDate, endDate, vendorId) }; if (dataSourceRequest.Filters != null) { viewModel.VendorQuarterlyRevenueData = (IQueryable<VendorRevenueModel>)viewModel.VendorQuarterlyRevenueData.Where(dataSourceRequest.Filters); } foreach (var item in viewModel.VendorQuarterlyRevenueData) { viewModel.FreightRevenueSum += item.FreightRevenue; viewModel.NetSalesSum += item.NetSales; viewModel.RentalIncomeSum += item.RentalIncome; } return View("VendorQuarterlyRevenueReport", viewModel);
This is the situation:
I have a form that when i click in the submit button is sending a file
with the kendo upload control, and the method action of the controller
is receiving that file in the parameter with the HttpPostedFileBase.
This is my HTML code:
@using (Html.BeginForm("ConfirmarOposicion", "Gestion", FormMethod.Post, new { @id = "Frm-login", role = "form", @class = "form-horizontal" }))
{
@(Html.Kendo().Upload()
.Name("files")
)
<button class="btn btn-success" type="submit" id="confirm" >Confirm</button>
}
And this is my controller:
public async Task<ActionResult> ConfirmarOposicion(IEnumerable<HttpPostedFileBase> files)
{
// Here the parameter files is not null..
}
Here is working all good till now. The problem is when i try to send
more values as parameter into the same method of the controller.
The other values that i want to send is an array, and the other is a
number.
This two values i try to send with ajax in javaScript.
This is my javaScript code when i try to send those two more values:
$("#confirm").click(function ()
{
var numMarca = $("#numMarca").val()
var idsToSend = [];
var grid = $("#Grid2").data("kendoGrid")
var ds = grid.dataSource.view();
for (var i = 0; i < ds.length; i++)
{
var row = grid.table.find("tr[data-uid='" + ds[i].uid + "']");
var checkbox = $(row).find(".checkbox");
if (checkbox.is(":checked"))
{
idsToSend.push(ds[i].DescMarca);
idsToSend.push(ds[i].IntencionOposicion = 1);
}
else
{
idsToSend.push(ds[i].DescMarca);
}
}
$.ajax({
url: '@Url.Action("ConfirmarOposicion", "Gestion")',
data: { ids: idsToSend, marca: numMarca },
type: 'POST',
dataType: "json",
success: function (data)
{
...
}
When i clik the submit button is sending this two values in the same controller that i send the input file.
And this my controller now:
public async Task<ActionResult> ConfirmarOposicion(IEnumerable<HttpPostedFileBase> files, string[] ids, string marca)
{
// here the array ids and the value of marca is not null, but the parameter files it is null
}
And that's the issue that i have.
I need to send all those values in the same method action of the controller.
How can i do that?

This is a two part question, first how do I know what controller parameters are needed fro the update action for the tree view (Same question applies to all Kendo controls) No error is thrown so I don't known what route (route signature) to build.
Second, could be related to the first my action is public JsonResult Update([DataSourceRequest] DataSourceRequest request, ProductViewModel product) but when I do a drag and drop the action isn't fired. I have found when this happens typically it is because I don't have a matching signature for the route... but again no error is thrown so I can't debug it.
Thanks in advance and sorry if I am not using the correct terminology for this.

Hi,
it seems that the selection in the AutoComplete is not correct (see attached Pictures) - it should be the same as the other Dropdowns (Combo, list)
robert
