0) Shouldn't the theme builder also allow us to change default fonts, font sizes, line heights, etc?
1) The themes builder itself doesn't appear to change ALL colors. For instance, the chart grid lines, scrollbars, etc. This is especially annoying in dark themes. Some controls' text, as well as grid lines can't be seen, and scrollbars keep their "light" appearance.
I want to create dynamic grid in ASP .Net MVC using Kendo grid. No of Columns are not fixed. It will get from database based on some conditions.
What will be the correct way to do it?
Also, If any of column has image url, in that case i want to display fixed size image
I recently upgraded from a 2016 version of Kendo to 2018.
All foreign key values that were bound to int? (notice the ?, this is specific to Nullable<T>) are not saving.
I managed to fix this in some cases by adding the bolded:
columns.ForeignKey(p => p.IndexId, (System.Collections.IEnumerable)ViewData["indexNames"], "Id", "Name").Title("Index").Width(60).HtmlAttributes(new { data_value_primitive = "true" });
In some cases though, the bold doesn't work.
So my question is why do primative FK columns involving Nullable<T> (seems to be primitives only, as GUID? as FKs work) break when they used to work?
I have problem with
running the TelerikMvcWebMail application .
I opened
application with VS 2017
When try run it ,
the following error occurs: “Unable to find version '2018.3.911' of
package 'Telerik.UI.for.AspNet.Mvc5.Trial'.”
When I tried the
install/update the (the package source Telerik.com defined and have connection
to the server https://nuget.telerik.com/nuget)
I also got the error:
Severity Code Description Project File Line Suppression
State
Error NuGet Package
restore failed for project TelerikMvcWebMail: Unable to find version
'2018.3.911' of package 'Telerik.UI.for.AspNet.Mvc5.Trial'. https://www.nuget.org/api/v2/curated-feeds/microsoftdotnet/:
Error downloading 'Telerik.UI.for.AspNet.Mvc5.Trial.2018.3.911' from
'https://www.nuget.org/api/v2/curated-feeds/microsoftdotnet/'. The
ServicePointManager does not support proxies with the https scheme. https://api.nuget.org/v3/index.json:
Package 'Telerik.UI.for.AspNet.Mvc5.Trial.2018.3.911' is not found on source
'https://api.nuget.org/v3/index.json'. https://nuget.telerik.com/nuget:
Unable to load the service index for source https://nuget.telerik.com/nuget.
An error occurred while sending the request. The request was aborted:
The request was canceled. This method is not supported by this class.. 0
Can you help me
please to solve the problem?
I have an issue where a grid's datasource hasChanges function is not working in IE, but does work in Chrome.
When leaving the page, I check to see if there are changes to the grid's data source, and if there are changes I prompt to make sure they want to leave with unsaved changes. In this example, I save changes successfully and the hasChanges still returns true after the save is complete.
Controller update function:
[AcceptVerbs(HttpVerbs.Post)]
public
ActionResult Minimum_Create([DataSourceRequest] DataSourceRequest request, [Bind(Prefix =
"models"
)]IEnumerable<MinimumsViewModel> records)
{
try
{
CDIWholesaleServiceClient client =
new
CDIWholesaleServiceClient();
if
(records.Any())
{
foreach
(var record
in
records)
{
record.contractID =
int
.Parse(Request[
"globalContractID"
]);
var input = WholesaleDataMapper.ConvertMinimumRate(record);
var output = client.InsertMinimumRate(input);
record.id = output.MinimumID;
}
}
return
Json(records.ToDataSourceResult(request, ModelState));
}
catch
(Exception ex)
{
ModelState.AddModelError(
"Minimum Creation Error"
, ex.Message);
return
Json(records.ToDataSourceResult(request, ModelState));
}
}
Client Code:
function
goodbye(e) {
var
minimumsGrid = $(
'#MinimumsGrid'
).data().kendoGrid;
if
(minimumsGrid.dataSource.hasChanges()
) {
LeavingUnsavedNotify(e);
}
}
window.onbeforeunload = goodbye;
@(Html.Kendo().Grid<WholesaleWeb.Models.MinimumsViewModel>(Model.minimums)
.Name(
"MinimumsGrid"
)
.Columns(columns =>
{
columns.Command(command => command.Destroy()).Width(90);
columns.ForeignKey(x => x.timeUnitID, Model.minimumsTimeUnits,
"Key"
,
"Value"
).Title(
"Time Unit"
).Width(100);
columns.ForeignKey(x => x.qtyTypeID, Model.minimumsQtyTypes,
"Key"
,
"Value"
).EditorTemplateName(
"MinimumsQuantityType"
).Title(
"Qty Type"
).Width(100);
columns.ForeignKey(x => x.unitID, Model.minimumsByTypes,
"Key"
,
"Value"
).EditorTemplateName(
"MinimumsBy"
).Title(
"By"
).Width(100);
columns.Bound(x => x.minDollarAmt).EditorTemplateName(
"PositiveNumber"
).Title(
"Min"
).Width(80);
columns.Bound(x => x.feePerExam).EditorTemplateName(
"PositiveNumber"
).Title(
"Fee Per Exam"
).Width(120).Editable(
"feePerExamEditable"
);
})
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Pageable()
.Navigatable()
.Reorderable(reorder => reorder.Columns(
true
))
.Sortable()
.Scrollable()
.Editable(editable => editable.DisplayDeleteConfirmation(
true
))
.Resizable(resize => resize.Columns(
true
))
.ToolBar(toolbar =>
{
toolbar.Create();
})
.DataSource(dataSource => dataSource
.Ajax()
.Batch(
true
)
.PageSize(10)
.ServerOperation(
false
)
.Events(events => events.Error(
"error_handler"
).RequestEnd(
"MinimumRates_End"
))
.Model(model =>
{
model.Id(x => x.id);
})
.Create(create => create.Action(
"Minimum_Create"
,
"Wholesale"
).Data(
"getGlobalContractID"
))
.Update(update => update.Action(
"Minimum_Update"
,
"Wholesale"
).Data(
"getGlobalContractID"
))
.Destroy(destroy => destroy.Action(
"Minimum_Destroy"
,
"Wholesale"
).Data(
"getGlobalContractID"
))
)
.HtmlAttributes(
new
{ style =
"width:100%"
})
)
I have a Grid that I need to create a URL where part of the URL is part of the Bound Data from another field.
So for example I have the Bound column \\#= MAPNAME \\# that will have the data A30-32-A1 and I need to get the first 3 characters A30
In my VB head I just want to use a LEFT string command. Is there a way to do a manipulation to get this to be part of the URL I am trying to concatenate?
Here is snippet of the line I am trying to edit and below that the Grid call (all of the code) I don't really want to have to edit the controller or model... any suggestions?
columns.Bound(m => m.GRIDPRTID)
.ClientTemplate("<a href='" + Url.Content("http://gis.xxxxxx.com/GISGateway/GridPrints/IN NEED THE A30 HERE/A30-32-A1.pdf") + "' target='_blank'>\\#= MAPNAME \\#.pdf</a>");
@(Html.Kendo().Grid(
new
List<GRIDPRINTS>())
//<GISPortal.GRIDPRINTS>()
.Name(
"grid_#=WOID#"
)
// template expression, to be evaluated in the master context
.Columns(columns =>
{
columns.Bound(o => o.GRIDPRTID).Width(110).Title(
"GridID"
);
columns.Bound(o => o.MAPNAME).Width(110).Title(
"Name"
);
columns.Bound(o => o.GRIDID).Width(110).Title(
"GridID"
);
columns.Bound(o => o.SCALE).Width(110).Title(
"Scale"
);
columns.Bound(o => o.PAGENUMBER).Title(
"PgNum"
);
columns.Bound(o => o.STATUS).Width(200).Title(
"Status"
);
columns.Bound(o => o.ERRORS).Width(300).Title(
"Errors?"
);
columns.Bound(m => m.GRIDPRTID)
.ClientTemplate(
"<a href='"
+ Url.Content(
"file://macfap01/GIS/GridPrints/A21/\\#= MAPNAME \\#.pdf"
) +
"' target='_blank'>\\#= MAPNAME \\#.pdf</a>"
);
columns.Bound(m => m.MAPNAME).Hidden()
.ClientTemplate(
"<input type='hidden' "
+
"name='MAPNAME[\\#= GRIDPRTID \\#]' "
// + "name='THEMAPNAME[\\#= GRIDPRTID \\#].MAPNAME' "
+
"value='\\#= MAPNAME \\#' />"
);
columns.Bound(m => m.PAGENUMBER).Hidden()
.ClientTemplate(
"<input type='hidden' "
+
"name='PAGENUMBER[\\#= GRIDPRTID \\#]' "
// + "name='THEPAGENUMBER[\\#= GRIDPRTID \\#].PAGENUMBER' "
+
"value='\\#= PAGENUMBER \\#' />"
);
columns.Bound(m => m.SCALE).Hidden()
.ClientTemplate(
"<input type='hidden' "
+
"name='SCALE[\\#= GRIDPRTID \\#]' "
//+ "name='THESCALE[#=gridIndex(data)#].SCALE' "
+
"value='\\#= SCALE \\#' />"
);
columns.Bound(m => m.WOID).Hidden()
.ClientTemplate(
"<input type='hidden' "
+
"name='WOID[\\#= GRIDPRTID \\#]' "
//+ "name='THESCALE[#=gridIndex(data)#].SCALE' "
+
"value='\\#= WOID \\#' />"
);
columns.Bound(o => o.MAPNAME).Width(110).Title(
"ReSend"
)
.ClientTemplate(
"<input type='checkbox' "
+
"name='checked[\\#= GRIDPRTID \\#]' "
// + "name='CHECKED\\#= WOID \\#.MAPNAME' "
+
"value='true' "
+
"#if (WOID) { #checked='checked'# } #/>"
+
"<input type='hidden' value='false' "
+
"name='checked[\\#= GRIDPRTID \\#]' />"
);
// + "name='themapname\\#= WOID \\#.MAPNAME' />");
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(10)
.Read(read => read.Action(
"GRIDPRINTS_Read"
,
"GridPrint"
,
new
{ woid =
"#=WOID#"
}))
.ServerOperation(
false
)
)
.Pageable()
.Sortable()
.ToClientTemplate()
)
@(Html.Kendo().DropDownList()
.Name(
"StatesDDL"
)
.DataTextField(
"StateName"
)
.DataValueField(
"StateID"
)
.DataSource(s =>
{
s.Read(r =>
{
r.Action(
"GetStates"
,
"Donation"
);
});
})
.SelectedIndex(selectedState)
.Height(300)
//.HtmlAttributes(new { id = "StateDDL" })
.Events(e =>
{
e.Change(
"change"
)
/*.Select("select")*/
;
})
)
function change(e) {
var x = $(
'StatesDDL option:selected'
).text();
var y = $(
'StateDDL option:selected'
).val();
var z = $(
"StatesDDL"
).val(
"DataTextField"
).val(
"StateName"
);
var z1 = $(
"StatesDDL"
).data(
"DataTextField"
,
"StateName"
).val();
var z2 = $(
"StatesDDL"
).data(
"DataValueField"
,
"StateID"
).val();
var z3 = $(
'StatesDDL'
).data();
var z4 = $(
this
).text();
alert(
"Changed"
);
// how to get value that was selected?
// how to get the changed value?
// I want to then use ajax to sent that up to my controller
};
Kendo UI Version: 2018.3.1017
Jquery: 2.2.0
Hi there,
I have managed to solve this issue but the solution was a bit of a mess. So I needed to have some columns in an in-place batch edit grid to be calculated as the user changed each column. These columns are non-editable i.e. with .Editable(false) in the Model.
I ended up using the change event to subscribe my Javascript method as below
.Events(events => events.Change("calculateJSMethod"))
Then in that function had :
function calculateJSMethod(e) {
e.preventDefault();
$("#myGridID").data("kendoGrid").refresh();
var item = e.items[0];