Hi,
We are wondering if it is possible to create a pop up message box using kendo UI for MVC that only shows up in the webpage if any value within a Kendo grid's column exceeds a certain number? Below is the code we have. col.Bound(c => c.Current).Title("Current") would be the column that contains Double and if any of the values under Current exceeds the number 3, we'd like to have a pop up box in the web.
Thanks!
@(Html.Kendo().TabStrip()
.Name("Tabs")
.Items(items =>
{
items.Add()
.Text("Table").Selected(true)
.Content(@<text>
<div>
@(Html.Kendo().Grid(Model.XXTable).Name("XXTable")
.Columns(col =>
{
col.Bound(c => c.Name).Title("XXX").Width(200).HeaderHtmlAttributes(new {style = "background:#d50032;font-weight:bold;color:white"});
col.Bound(c => c.Current).Title("Current").Width(100).HeaderHtmlAttributes(new { style = "background:#d50032;font-weight:bold;color:white" });
}))
</div>
Hi, we recently upgraded from kendo 2020 to 2021.2.616.
We use System.web.optimization to bundle resources, when building Debug configuration all works fine because bundling is disabled, however when building the Release configuration the bundle is missing some javascripts files, I can't figure out which ones.
This is the bundle definition:
RegisterScriptBundle(bundles,"~/scripts/libraries", "~/Scripts/jquery-1.12.4.min.js", "~/Scripts/kendo/2021.2.616/kendo.all.min.js", "~/Scripts/kendo/2021.2.616/kendo.aspnetmvc.min.js", "~/Scripts/kendo/2021.2.616/cultures/kendo.culture.en.min.js", "~/Scripts/jquery.unobtrusive-ajax.min.js", "~/Scripts/jquery.knob.min.js", "~/Scripts/kendo.web.ext.js", "~/Scripts/jquery.charcounter.js", "~/Scripts/jquery-ui-1.12.1.min.js");
The javascript error is:
Uncaught TypeError: r.clone is not a function at i.r [as bbox] (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:19734) at i._clippedBBox (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:19612) at i.clippedBBox (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:19587) at ns (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:16998) at i._clippedBBox (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:20809) at i.clippedBBox (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:19587) at u._initGroups (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:20941) at u.reflow (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:20895) at init.reflow (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:154923) at init.reflow (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:141656)
prettyfied related code:
Is there any way to set the column name for the expendable column of the parent for ClientDetailsTemplateId .
There are three issues with this, first, it does not show the column name, the second I want to change the width of these columns and third there is no column separator as we have for other columns.
Please find the attached screenshot.
Hi Team,
We are using RadEditor in our MVC application. Content entered or copied is converted to RTF format and then saved to database.
But when we copy text like following from Microsoft word:- Text for “Unicode ‘Testing’ Test” (text containing quotes entered in MS word) , after exporting to RTF, it is converting to Unicode characters as following :- \u8220?UniCode \u8216?Testing\u8217? Test\u8221.
Even when we disable the filter of ConvertCharactersToEntitiesas shown below, still it is not working.
RadEditor1.DisableFilter(Telerik.Web.UI.EditorFilters.ConvertCharactersToEntities));
Instead of replacing the above characters by hardcoding them, is there any possible way to avoid this Unicode conversion. Please let us know if it is possible.
Thanks in Advance,
Sushma Katneni
I have enabled conditional ClientDetailTemplateId in Kendo MVC Grid, It's working as expected.
But I also want to enable/disable the row on cell value change in the grid. So If ID is X then should not be expandable, but if it's other than X then it should be expandable (show the expandable mark on the first cell, and on click of it it should show the child div).
I have tried this, But it is not working.
<script id="templateSubRow" type="text/kendo-tmpl">
# if (ID == 'X') { #
<div>Child Div</div>
# } #
</script>
@(Html.Kendo().Grid<MyModel>()
.Name("mygrid")
.Columns(columns =>
{
columns.Bound(config => config.ID).Width(90).Title("ID").HeaderHtmlAttributes(new { @class = "grid-headercustom" })
.HtmlAttributes(new { @class = "grid-rowcustom" }).Filterable(ftb => ftb.Enabled(true));
})
.HtmlAttributes(new { style = "height:100%" })
.NoRecords("No Data Available")
.Editable(e => e.Mode(GridEditMode.InCell))
.Scrollable()
.Sortable()
.Navigatable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.ServerOperation(false)
.Events(e => e.Change("onChange"))
.Read(read => read.Action("MyActionMethod", "MyController"))
.PageSize(150)
.Model(model => { model.Id(p => p.ID);
model.Field(p => p.ID).Editable(true);
}))
.ClientDetailTemplateId("templateSubRow")
.Events(x => x.DataBound("dataBound"))
)
function dataBound() {
var dataSource = this.dataSource;
this.element.find('tr.k-master-row').each(function () {
var row = $(this);
var data = dataSource.getByUid(row.data('uid'));
if (data.ID === 'X') {
row.find('.k-hierarchy-cell a').css({ opacity: 0.0, cursor: 'default' }).click(function (e) { e.stopImmediatePropagation(); return false; });
}
});
}
function onChange(e) {
if (e.action == "itemchange") {
var items = e.items;
var grid = $('#mygrid').data('kendoGrid');
for (var i = 0; i < items.length; i++) {
var dataItem = items[i];
if (e.field == 'ID') {
var rowCells = grid.element.find("tr[data-uid=" + dataItem.uid + "] td");
if (dataItem.ID === 'X') {
$(rowCells[0]).addClass('kendo-cell-highlighter');
$(rowCells[0]).click(function (e) { e.stopImmediatePropagation(); return false; });
}
else {
$(rowCells[0]).removeClass('kendo-cell-highlighter');
$(rowCells[0]).click(function (e) { return true; });
}
}
}
}
}
<style>
.kendo-cell-highlighter {
opacity: 0.0;
cursor: default
}
</style>
I am upgrading my application to Telerik UI for AspNet.Core v2021.2.616. I got the grid to display data, but the grid pager component shows 0 as the current page and the pager navigation controls are disabled
Here is the view
<text>
<kendo-grid name="usersGrid" on-data-bound="UserMaintenance.onDataBound" selectable="true">
<datasource type="DataSourceTagHelperType.Ajax" page-size="5"> <transport> <read url="@Url.Action("GetUsers", "User", new { Area = "Admin" })" type="post" /> </transport> <schema data="data"> </schema> </datasource> <columns> <column field="userId" title="User Id" width="1" visible="false" html-attributes='new Dictionary<string, object>{ ["class"] = "primary-key" }' /> <column field="userName" title="User Name" /> <column field="stateUserId" title="State User Identifier" /> <column field="email" title="Email" /> <column field="isActive" title="Active" template="#= isActive ? 'Yes' : 'No' #" width="100" /> <column title="Actions"> <commands> <column-command text="Edit" id="edit" name="edit" click="function(e){UserMaintenance.onOpenEditUserModal(e, 'UserId')}" /> <column-command text="Deactivate" id="deactivate" name="deactivate" click="function(e){UserMaintenance.onOpenDeleteUserModal(e, 'UserId')}" /> <column-command text="Activate" id="activate" name="activate" click="function(e){UserMaintenance.onOpenActivateUserModal(e, 'UserId')}" /> </commands> </column> </columns> <toolbar> <toolbar-button text="Add User" name="Add" template="UserMaintenance.userCustomTemplate" /> </toolbar> <scrollable enabled="true" /> <groupable enabled="true" /> <sortable enabled="true" /> <pageable enabled="true" responsive="false" button-count="5" refresh="true" page-sizes="new int[] { 5, 10, 20 }"></pageable> <filterable enabled="true" /> </kendo-grid>
</text>
Here is the controller method
<text>
public ActionResult GetUsers([DataSourceRequest] DataSourceRequest request, string userSearch) { var users = _uow.UserRepository.GetAll() .AsNoTracking() .OrderBy(u => u.UserName); var result = users.ToDataSourceResult(request); return Json(result); }
</text>
What am I missing? If this is not enough information, let me know what else you need to see
Thanks
Hello,
We used both kendo Grid and kendo Chart in our MVC project. When we load big data on Grid , the Processing Wheel image (see below image) had automatically applied to UI even we don’t setting anything. Unlike Grid I did not found same image applied to the UI when get big data for chart. Since we need calculate the value based on the busyness logic which take bit longer time. Now user will wait in front of empty chart screen until chart finally showed up. Could Telerik team have some guides for resolving the issue? Thanks.
Image of Processing data...
Hi,
Im using kendo MVC version 2016.3.1118.545
I want to use equal to filter on date and time column for format {MM/dd/yyyy hh:mm tt} but its not working
I have seen few solution but its only for filtering date alone.
Please provide some solution for this