Hi
I've explored the use of Moq. I found it useful, except for the fact that it relies heavily on code style that uses dependency injection. As I'm working on some existing legacy code, it can become quite the refactoring effort. The code base also includes some assembly references that could not be addressed via Moq.
Microsoft Fakes worked great IMHO. The only downside I saw was the requirement of VS Enterprise 2019. I'm not sure if I can get my employer to pay for the $5k/yr/developer. I really liked the ability to generate fakes on an assembly directly within VS.
Telerik's solution looks equally expensive. I've yet to explore it. Fakes, Stubs, and Mocks (telerik.com)
Prig looks viable, but looks like a pain to setup with powershell scripts, omegle etc.
Thanks
ASP.NET MVC 2020.3.915, development on an enclave network, so upgrading to newer versions takes an act of Congress, and all the code shown here is typed in by hand—meaning if there are any obvious typos, don't take that as the reason it's not working.
I have a DropDownList set up to get a fresh list of items based on Change and Close events on two DatePicker controls, and it works exactly as desired. I am trying to move this same set of controls to an (existing) preferences settings page. I copied the cshtml code verbatim and made appropriate changes, but it's not working.
Here's the control that is working. It sits inside a TabStrip control:
<div class="editor-field">
@(Html.Kendo().DropDownListFor(m => m.ReportType)
.Name("ReportType")
.DataTextField("Text")
.DataValueField("Value")
.OptionLabel("Select a Report Type...")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetFilteredTeams", "Home").Data("get_Dates");
}).ServerFiltering(true);
})
.HtmlAttributes(new { @class = "reportTypeDropdown" }))
</div>When I inspect this page, I see that this JavaScript was generated:
kendo.SyncReady(function(){jQuery("#ReportType").kendoDropDownList({dataSource":{"transport":{"read":{"url":"/Reporting/Home/GetFilteredTeams","data":getDates},"prefix":""},"serverFiltering":true,"filter":[],"schema":{"errors":"Errors"}},"dataTextField":"Test","dataValueField":"Value","optionLabel":"Select a Report type..."});});
Again, I copied the DropDownList over to the preference page, where it's inside a PanelBar, made appropriate changes, and this is what it looks like: (FWIW, the get_Dates JavaScript function is in a separate JavaScript file associated with the preferences page. Also, the DropDownList is not bound to the model here).
<div class="pref-sub-section-item">
@(Html.Kendo().DropDownList
.Name("ReportTypePref")
.DataTextField("Text")
.DataValueField("Value")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetFilteredTeams", "Preferences").Data("get_Dates");
}).ServerFiltering(true);
})
.HtmlAttributes(new { @class = "reportTypeDropdown" }))
</div>
However, this is the JavaScript that gets generated:
kendo.SyncReady(function(){jQuery("#ReportTypePref").kendoDropDownList({"dataTextField":"Test","dataValueField":"Value"});});Hi,
I wonder if you could help. I have a Kendo UI grid that has 2 bool elements, this is a MVC core 3.1 project. When I click on the Create or Update buttons on the Edit popup, nothing happens - no errors and the controller action is not being called.
I have code similar to the following code for the grid itself :
@(Html.Kendo().Grid<MyObject>()
.Name("MyGrid")
.DataSource(dataSource => dataSource
.Ajax()
.Model(m => m.Id(e => e.Id))
.PageSize(20)
.Read(read => read.Action("Read", "ActionRead"))
.Create(create => create.Action("Create", "ActionCreate"))
.Update(update => update.Action("Update", "ActionUpdate"))
.Events(events => events.Error("onError"))
)
.Columns(columns =>
{
columns.Bound(p => p.Name);
columns.Bound(p => p.IsCompleteStatus).ClientTemplate("<input type='checkbox' #= IsCompleteStatus ? checked='checked' :'' # />");
columns.Bound(p => p.IsPendingStatus);
columns.Command(command =>
{
command.Edit();
command.Custom("Remove").Click("onRemove").Visible("isRemoveable").IconClass("k-icon k-i-delete k-icon-32");
command.Custom("Restore").Click("onRestore").Visible("isRestorable").IconClass("k-icon k-i-reset k-icon-32");
});
})
.ToolBar(toolbar => toolbar.Create().Text("Add Status"))
.Editable(editable => editable.Mode(GridEditMode.PopUp))
.GridDefaults()And this is what I have in my view for the popup window:
<form>
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input asp-for="Id" type="hidden" />
@Html.FormGroupFor(m => m.Name)
@Html.EditorFor(m => m.IsCompleteStatus)
@Html.FormGroupFor(m => m.IsPendingStatus)
</form>The popup displays fine. However clicking on the Create button (when I hit 'Add') or the Update button (when I click on 'Edit') does absolutely nothing, unless I actually check the checkbox.
If it is a bool type, it also doesn't let me leave it empty, so it needs it checked all the time.
If it a bool? type, it doesn't let me interact with it at all - I cannot check the boxes, so no Create/Update either. If I remove the checkboxes from the view, it displays and works fine. Can you help please? Thank you
Hi Team,
I am using Kendo UI MVC Grid and trying to override the checkbox style using FontAwesome fonts. I thought of doing it through CSS alone but since we can't select parent selector through CSS I ended up using the filterMenuInit event.
Grid column is configured using:-
.Filterable(f => f.Multi(true).Search(true));I am adding another label to the rendered checkbox text using the below function:-
function addCustomLabel(e) {
var container = e.container;
var allCheckboxes = $("input[type='checkbox']", container);
$.each(allCheckboxes, function (id) {
$(this).attr("id", 'chk' + id).addClass("blueCheckbox");
var checkbox = $(this)[0];
console.log(checkbox);
var parentLabel = $(this).parent('label');
var labelText = parentLabel.text();
parentLabel.empty();
parentLabel.append(checkbox);
parentLabel.append("<label for='"+ 'chk' + id +"'>" + labelText + "</label>");
});
}
Hi
We have two applications, one is WPF application that reads some RadDocument (see below) and displays it to the screen in non-paged format (layoutMode=flow). The user can then edit it via a RadRichTextEditor, and when they save it, the output is saved in DB.
Then We have a ASP.NET MVC application that does the same thing, but converts it to Html first. But when the converter (seen below) tries to make RadDocument out of it, it adds all kinds of extra styling and changes it to paged instead of flow layoutMode.
This is not what we want, but we cannot figure out how to avoid this behavior.
Here's a concrete example:
These are the two methods we use to convert From and to Html.
private string RadDocToHTMLConverter(string radDoc) {
RadDocument doc = RadDocumentExtention.ToRadDocument(radDoc);
var RTB_Provider = new Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.DocxFormatProvider();
var flow_Provider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider();
var doc_bytes = RTB_Provider.Export(doc);
var flowDocuemnt = flow_Provider.Import(doc_bytes);
string html = new HtmlFormatProvider().Export(flowDocuemnt);
return html;
}
private string HTMLtoRadDocStringConverter(string html) {
var RTB_Provider = new Telerik.Windows.Documents.FormatProviders.OpenXml.Docx.DocxFormatProvider();
var flow_Provider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider();
var flowDocuemnt = new HtmlFormatProvider().Import(html);
var doc_bytes = flow_Provider.Export(flowDocuemnt);
var rtbDoc = RTB_Provider.Import(doc_bytes);
return rtbDoc.ToStr();
}The problem occurs when the input html string is put through the HtmlFormatProvider.
Example of data to and from DB:
This is what we get FROM our DB that then needs to be converted to html for display on mvc page:
<t:RadDocument xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:t="clr-namespace:Telerik.Windows.Documents.Model;assembly=Telerik.Windows.Documents" xmlns:s="clr-namespace:Telerik.Windows.Documents.Model.Styles;assembly=Telerik.Windows.Documents" xmlns:r="clr-namespace:Telerik.Windows.Documents.Model.Revisions;assembly=Telerik.Windows.Documents" xmlns:n="clr-namespace:Telerik.Windows.Documents.Model.Notes;assembly=Telerik.Windows.Documents" xmlns:th="clr-namespace:Telerik.Windows.Documents.Model.Themes;assembly=Telerik.Windows.Documents" version="1.4" LayoutMode="Flow" LineSpacing="1.14999997615814" LineSpacingType="Auto" ParagraphDefaultSpacingAfter="0" ParagraphDefaultSpacingBefore="0" StyleName="defaultDocumentStyle">
<t:RadDocument.Captions>
<t:CaptionDefinition IsDefault="True" IsLinkedToHeading="False" Label="Figure" LinkedHeadingLevel="0" NumberingFormat="Arabic" SeparatorType="Hyphen" />
<t:CaptionDefinition IsDefault="True" IsLinkedToHeading="False" Label="Table" LinkedHeadingLevel="0" NumberingFormat="Arabic" SeparatorType="Hyphen" />
</t:RadDocument.Captions>
<t:RadDocument.ProtectionSettings>
<t:DocumentProtectionSettings EnableDocumentProtection="False" Enforce="False" HashingAlgorithm="None" HashingSpinCount="0" ProtectionMode="ReadOnly" />
</t:RadDocument.ProtectionSettings>
<t:RadDocument.Styles>
<s:StyleDefinition DisplayName="Document Default Style" IsCustom="False" IsDefault="False" IsPrimary="True" Name="defaultDocumentStyle" Type="Default">
<s:StyleDefinition.ParagraphStyle>
<s:ParagraphProperties LineSpacing="1.14999997615814" SpacingAfter="0" />
</s:StyleDefinition.ParagraphStyle>
<s:StyleDefinition.SpanStyle>
<s:SpanProperties FontFamily="Verdana" FontSize="10.6700000762939" FontStyle="Normal" FontWeight="Normal" />
</s:StyleDefinition.SpanStyle>
</s:StyleDefinition>
<s:StyleDefinition DisplayName="Normal" IsCustom="False" IsDefault="True" IsPrimary="True" Name="Normal" Type="Paragraph" UIPriority="0" />
<s:StyleDefinition DisplayName="Table Normal" IsCustom="False" IsDefault="True" IsPrimary="False" Name="TableNormal" Type="Table" UIPriority="59">
<s:StyleDefinition.TableStyle>
<s:TableProperties CellPadding="5,0,5,0">
<s:TableProperties.TableLook>
<t:TableLook />
</s:TableProperties.TableLook>
</s:TableProperties>
</s:StyleDefinition.TableStyle>
</s:StyleDefinition>
</t:RadDocument.Styles>
<t:Section>
<t:Paragraph>
<t:Span FontWeight="Bold" Text="" />
<t:Span Text=" " />
</t:Paragraph>
<t:Paragraph>
<t:Paragraph.ParagraphSymbolPropertiesStyle>
<s:SpanProperties FlowDirection="LeftToRight" />
</t:Paragraph.ParagraphSymbolPropertiesStyle>
<t:Span FontWeight="Bold" Text="" />
<t:Span Text=" " />
</t:Paragraph>
</t:Section>
</t:RadDocument>Then we convert it to html, (this works as expected) and displayed..
Then without editing anything but simply pressing save, taking the result of Kendo.Editor(), we get some html string that we put into the converter and get THIS result:
<t:RadDocument xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:t="clr-namespace:Telerik.Windows.Documents.Model;assembly=Telerik.Windows.Documents" xmlns:s="clr-namespace:Telerik.Windows.Documents.Model.Styles;assembly=Telerik.Windows.Documents" xmlns:r="clr-namespace:Telerik.Windows.Documents.Model.Revisions;assembly=Telerik.Windows.Documents" xmlns:n="clr-namespace:Telerik.Windows.Documents.Model.Notes;assembly=Telerik.Windows.Documents" xmlns:th="clr-namespace:Telerik.Windows.Documents.Model.Themes;assembly=Telerik.Windows.Documents" version="1.4" LayoutMode="Paged" LineSpacing="1" LineSpacingType="Auto" ParagraphDefaultSpacingAfter="0" ParagraphDefaultSpacingBefore="0" StyleName="defaultDocumentStyle">
<t:RadDocument.Captions>
<t:CaptionDefinition IsDefault="True" IsLinkedToHeading="False" Label="Figure" LinkedHeadingLevel="0" NumberingFormat="Arabic" SeparatorType="Hyphen" />
<t:CaptionDefinition IsDefault="True" IsLinkedToHeading="False" Label="Table" LinkedHeadingLevel="0" NumberingFormat="Arabic" SeparatorType="Hyphen" />
</t:RadDocument.Captions>
<t:RadDocument.ProtectionSettings>
<t:DocumentProtectionSettings EnableDocumentProtection="False" Enforce="False" HashingAlgorithm="None" HashingSpinCount="0" ProtectionMode="ReadOnly" />
</t:RadDocument.ProtectionSettings>
<t:RadDocument.Styles>
<s:StyleDefinition DisplayName="Document Default Style" IsCustom="False" IsDefault="False" IsPrimary="True" Name="defaultDocumentStyle" Type="Default">
<s:StyleDefinition.ParagraphStyle>
<s:ParagraphProperties FirstLineIndent="0" LeftIndent="0" LineSpacing="1" RightIndent="0" SpacingAfter="0" SpacingBefore="0" TextAlignment="Left" />
</s:StyleDefinition.ParagraphStyle>
<s:StyleDefinition.SpanStyle>
<s:SpanProperties FlowDirection="LeftToRight" FontFamily="Verdana" FontSize="10.67" FontStyle="Normal" FontWeight="Normal" ForeColor="#FF000000" />
</s:StyleDefinition.SpanStyle>
</s:StyleDefinition>
<s:StyleDefinition BasedOnName="Normal" DisplayName="Heading 3" IsCustom="False" IsDefault="False" IsPrimary="False" LinkedStyleName="Heading3Char" Name="Heading3" NextStyleName="Normal" Type="Paragraph" UIPriority="9">
<s:StyleDefinition.ParagraphStyle>
<s:ParagraphProperties KeepLines="True" OutlineLevel="3" SpacingAfter="0" SpacingBefore="13.3333330154419" />
</s:StyleDefinition.ParagraphStyle>
<s:StyleDefinition.SpanStyle>
<s:SpanProperties FontWeight="Bold" ForeColor="#FF4F81BD" ThemeFontFamily="major" ThemeForeColor="accent1" />
</s:StyleDefinition.SpanStyle>
</s:StyleDefinition>
<s:StyleDefinition DisplayName="Heading 3 Char" IsCustom="False" IsDefault="False" IsPrimary="False" LinkedStyleName="Heading3" Name="Heading3Char" Type="Character">
<s:StyleDefinition.SpanStyle>
<s:SpanProperties FontWeight="Bold" ForeColor="#FF4F81BD" ThemeFontFamily="major" ThemeForeColor="accent1" />
</s:StyleDefinition.SpanStyle>
</s:StyleDefinition>
<s:StyleDefinition BasedOnName="Normal" DisplayName="Heading 4" IsCustom="False" IsDefault="False" IsPrimary="False" LinkedStyleName="Heading4Char" Name="Heading4" NextStyleName="Normal" Type="Paragraph" UIPriority="9">
<s:StyleDefinition.ParagraphStyle>
<s:ParagraphProperties KeepLines="True" OutlineLevel="4" SpacingAfter="0" SpacingBefore="13.3333330154419" />
</s:StyleDefinition.ParagraphStyle>
<s:StyleDefinition.SpanStyle>
<s:SpanProperties FontStyle="Italic" FontWeight="Bold" ForeColor="#FF4F81BD" ThemeFontFamily="major" ThemeForeColor="accent1" />
</s:StyleDefinition.SpanStyle>
</s:StyleDefinition>
<s:StyleDefinition DisplayName="Heading 4 Char" IsCustom="False" IsDefault="False" IsPrimary="False" LinkedStyleName="Heading4" Name="Heading4Char" Type="Character">
<s:StyleDefinition.SpanStyle>
<s:SpanProperties FontStyle="Italic" FontWeight="Bold" ForeColor="#FF4F81BD" ThemeFontFamily="major" ThemeForeColor="accent1" />
</s:StyleDefinition.SpanStyle>
</s:StyleDefinition>
<s:StyleDefinition BasedOnName="Normal" DisplayName="Heading 5" IsCustom="False" IsDefault="False" IsPrimary="False" LinkedStyleName="Heading5Char" Name="Heading5" NextStyleName="Normal" Type="Paragraph" UIPriority="9">
<s:StyleDefinition.ParagraphStyle>
<s:ParagraphProperties KeepLines="True" OutlineLevel="5" SpacingAfter="0" SpacingBefore="13.3333330154419" />
</s:StyleDefinition.ParagraphStyle>
<s:StyleDefinition.SpanStyle>
<s:SpanProperties ForeColor="#FF4F81BD" ThemeFontFamily="major" ThemeForeColor="accent1" />
</s:StyleDefinition.SpanStyle>
</s:StyleDefinition>
<s:StyleDefinition DisplayName="Heading 5 Char" IsCustom="False" IsDefault="False" IsPrimary="False" LinkedStyleName="Heading5" Name="Heading5Char" Type="Character">
<s:StyleDefinition.SpanStyle>
<s:SpanProperties ForeColor="#FF4F81BD" ThemeFontFamily="major" ThemeForeColor="accent1" />
</s:StyleDefinition.SpanStyle>
</s:StyleDefinition>
<s:StyleDefinition BasedOnName="Normal" DisplayName="Heading 6" IsCustom="False" IsDefault="False" IsPrimary="False" LinkedStyleName="Heading6Char" Name="Heading6" NextStyleName="Normal" Type="Paragraph" UIPriority="9">
<s:StyleDefinition.ParagraphStyle>
<s:ParagraphProperties KeepLines="True" OutlineLevel="6" SpacingAfter="0" SpacingBefore="13.3333330154419" />
</s:StyleDefinition.ParagraphStyle>
<s:StyleDefinition.SpanStyle>
<s:SpanProperties FontStyle="Italic" ForeColor="#FF4F81BD" ThemeFontFamily="major" ThemeForeColor="accent1" />
</s:StyleDefinition.SpanStyle>
</s:StyleDefinition>
<s:StyleDefinition DisplayName="Heading 6 Char" IsCustom="False" IsDefault="False" IsPrimary="False" LinkedStyleName="Heading6" Name="Heading6Char" Type="Character">
<s:StyleDefinition.SpanStyle>
<s:SpanProperties FontStyle="Italic" ForeColor="#FF4F81BD" ThemeFontFamily="major" ThemeForeColor="accent1" />
</s:StyleDefinition.SpanStyle>
</s:StyleDefinition>
<s:StyleDefinition BasedOnName="Normal" DisplayName="Heading 7" IsCustom="False" IsDefault="False" IsPrimary="False" LinkedStyleName="Heading7Char" Name="Heading7" NextStyleName="Normal" Type="Paragraph" UIPriority="9">
<s:StyleDefinition.ParagraphStyle>
<s:ParagraphProperties KeepLines="True" OutlineLevel="7" SpacingAfter="0" SpacingBefore="13.3333330154419" />
</s:StyleDefinition.ParagraphStyle>
<s:StyleDefinition.SpanStyle>
<s:SpanProperties FontStyle="Italic" ForeColor="#FF000000" ThemeFontFamily="major" ThemeForeColor="text1" />
</s:StyleDefinition.SpanStyle>
</s:StyleDefinition>
<s:StyleDefinition DisplayName="Heading 7 Char" IsCustom="False" IsDefault="False" IsPrimary="False" LinkedStyleName="Heading7" Name="Heading7Char" Type="Character">
<s:StyleDefinition.SpanStyle>
<s:SpanProperties FontStyle="Italic" ForeColor="#FF000000" ThemeFontFamily="major" ThemeForeColor="text1" />
</s:StyleDefinition.SpanStyle>
</s:StyleDefinition>
<s:StyleDefinition DisplayName="Normal" IsCustom="False" IsDefault="True" IsPrimary="True" Name="Normal" Type="Paragraph" UIPriority="0">
<s:StyleDefinition.SpanStyle>
<s:SpanProperties FontSize="16" />
</s:StyleDefinition.SpanStyle>
</s:StyleDefinition>
<s:StyleDefinition BasedOnName="Normal" DisplayName="Normal (Web)" IsCustom="False" IsDefault="False" IsPrimary="False" Name="NormalWeb" Type="Paragraph" UIPriority="99">
<s:StyleDefinition.ParagraphStyle>
<s:ParagraphProperties AutomaticSpacingAfter="True" AutomaticSpacingBefore="True" SpacingAfter="6.66666650772095" SpacingBefore="6.66666650772095" />
</s:StyleDefinition.ParagraphStyle>
</s:StyleDefinition>
<s:StyleDefinition DisplayName="Table Normal" IsCustom="False" IsDefault="True" IsPrimary="False" Name="TableNormal" Type="Table" UIPriority="59">
<s:StyleDefinition.TableStyle>
<s:TableProperties CellPadding="7,0,7,0">
<s:TableProperties.TableLook>
<t:TableLook />
</s:TableProperties.TableLook>
</s:TableProperties>
</s:StyleDefinition.TableStyle>
</s:StyleDefinition>
</t:RadDocument.Styles>
<t:Section>
<t:Paragraph StyleName="NormalWeb">
<t:Span FontWeight="Bold" Text="" />
<t:Span Text=" " />
<t:Span FontWeight="Normal" Text="" />
</t:Paragraph>
<t:Paragraph StyleName="NormalWeb">
<t:Span FontWeight="Bold" Text="" />
<t:Span FontWeight="Normal" Text="" />
</t:Paragraph>
<t:Paragraph StyleName="NormalWeb">
<t:Span FontWeight="Normal" Text="" />
</t:Paragraph>
<t:Paragraph StyleName="NormalWeb">
<t:Span FontWeight="Bold" Text="" />
</t:Paragraph>
</t:Section>
</t:RadDocument>There are many issues here.
1. It has created LayoutMode to Paged instead of Flow, which looks wrong in the context we are using this for.
2. It adds all kinds of extra style like "NormalWeb" that we dont want or need. Makes the text bigger and adds margins, paddings and stuff that we dont want.
3. the converter code has barely any options or settings available, and the documentation is lacking at best.
The result we want to get out is the same as the original, so both applications can use it. Afterall we didn't edit anything, just converted it to and from html. Aka From RadDoc -> html -> RadDoc. So it should be the same, before and after.
HOW, can we fix this? If you could also provide examples, that would be great.

Hello - I have a grid with a toolbar defined. The grid is also coded to allow grouping. The grouping option is visible, but not the toolbar. If I disable grouping, the toolbar displays, I have other grids coded very much the same in my project that work fine.
What do I have wrong on this one?
Here is my code:
<div class="row pt-4 d-none centered" id="qSecurityGridDiv">
@(Html.Kendo().Grid<WSIPC.Web.Models_View.Security.QmlativSecurityUserList>()
.Name("grid")
.Columns(columns => {
columns.Bound(p => p.Id).Visible(false);
columns.Bound(p => p.UserName).Title("Username");
columns.Bound(p => p.LastName).Title("Last Name");
columns.Bound(p => p.FirstName).Title("First Name");
columns.Bound(p => p.Role).EditorTemplateName("DropDownRoles");
columns.Bound(p => p.Grade).Title("Grade Level");
columns.Bound(p => p.AssignedSchools).ClientTemplate("#= iterate(data)#").Title("Schools");
columns.Bound(p => p.Hsb).EditorTemplateName("DropDownIndicators").Title("HSB Access");
columns.Bound(p => p.HsbAdmin).EditorTemplateName("DropDownIndicators").Title("HSB Administrator Access");
columns.Bound(p => p.MsdAdmin).EditorTemplateName("DropDownIndicators").Title("MSD Administrator Access");
})
.ToolBar(toolbar =>
{
toolbar.Save();
toolbar.Excel();
toolbar.Pdf();
toolbar.Custom().Text("Mass Change").HtmlAttributes(new { id = "massChangeQ" });
})
.Pdf(pdf => pdf.ProxyURL(Url.Action("Excel_Export_Save", "Grid")).AllPages().FileName("Msd Security Grid"))
.Excel(excel => excel.ProxyURL(Url.Action("Excel_Export_Save", "Grid")).AllPages(true).FileName("Msd Security Grid"))
.AutoBind(false)
.Pageable()
.Sortable()
.Scrollable()
.Groupable()
.Reorderable(reorder => reorder.Columns(true))
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Filterable()
.HtmlAttributes(new { style = "height:750px;" })
.DataSource(dataSource => dataSource
.Ajax()
.Batch(true)
.PageSize(100)
.Read(read => read.Action("GetSecurityUsersFilteredGrid", "MsdQmlativSecurity").Data("additionalInfo"))
.Model(model =>
{
model.Id(p => p.Id);
model.Field(p => p.UserName).Editable(false);
model.Field(p => p.LastName).Editable(false);
model.Field(p => p.FirstName).Editable(false);
model.Field(p => p.Grade).Editable(false);
model.Field(p => p.AssignedSchools);
})
.Update("UpdateSecurityGridGroup", "MsdQmlativSecurity")
.Events(e => e.Sync("sync_handler"))
)
.Events(events => events.Edit("onEdit"))
)
</div><!-- end grid row-->
I've attached screen shots with grouping enabled and with it not.
Thanks for any help.
Lisa

I am using mvc and using the server as a datasource. I am trying to change the color of the column based on the value . I tried to many finding on the net but none is working see at least two of them in the code below.
//This example doesn't do anything.
columns.Bound(p => p.balance).Width(120).Sortable(false).Template(@<text>
@if (item.balance< 0)
{
<div style="background-color: Red;">
@item.balance;
</div>
}
else
{
<div style="background-color: Green;">
@item.amount_residence
</div>
}
</text>);
//This below example throw an error
@(Html.Kendo().Grid(Model)
Hi Sir,
In the MVC scheduler, I want to change the text of the SAVE button to text when I am using the addEvent functionality. It is simply a create appointment template.
I am doing like this and it is not working-
$('.k-edit-buttons k-state-default k-button k-primary k-scheduler-update k-button-text').text("Confirm");
Could you please suggest to me how I change the text of that button?
For your reference, I am attaching the screenshot so that you will get to know where I want to change, and I will also put a screenshot of the coding.
Simple question: what NuGet files and namespaces contain the "ToPagedList" methods?
Detail:
New to Telerik, new to these Forums, but thrilled they are here. I have what SHOULD be a simple question...
Web Application written 4 years ago using Telerik ASP.NET MVC (I think) and Telerik Kendo (I think). The 2017 App is running in production, but I need to make changes in the code (new feature stuff). Meanwhile, the guy who wrote it is no longer here - there is no one left who has touched it. Undocumented, of course. And we have moved from Visual Studio 2017 to Visual Studio 2019.
So I am trying to get the application to build pretty much "as is" so I can tinker with it and see how it works, and figure out exactly where I need to make changes. First build had 274 errors, then 64 errors... now down to 1 error in two places in one class; a reference to "ToPagedList" which is a method apparently used to pluck a specified page or pages from a result set for rendering (in a Grid?). Virtually all of that was uninstalling and reinstalling NuGet files because somehow they lost their initialization in the app files. So, plenty of places I could have gone awry.
"ToPagedList" works on a View derivative class; but apparently I am not including the proper Telerik references and libraries to get these two references to "ToPagedList" to resolve. Probably have some class confusion as well (something referencing Microsoft instead of Telerik).
The first of the two errors, other is basically identical in the same class:
Severity Code Description Project File Line Suppression State
Error CS1061 'IQueryable<IncidentDetailView>' does not contain a definition for 'ToPagedList' and no accessible extension method 'ToPagedList' accepting a first argument of type 'IQueryable<IncidentDetailView>' could be found (are you missing a using directive or an assembly reference?) QCWeb D:\QCWeb\QCWeb\Controllers\ReportController.cs 248 Active
Line 248 looks like:
return View(tickets.ToPagedList(pageNumber, pageSize));
where tickets is an instantiation of the "IQueryable<IncidentDetailView>",
and IncidentDetailView is partial class that contains the Entity Framework record field definitions for a database pseudo-table (query results).
If I could figure out which Telerik library that this method is defined in, I can probably work back to get other references properly aligned as well (ever the optimist). I am just not having much luck searching the Telerik documentation for class method lists and descriptions, nor am I having much luck playing library roulette. Any ideas? Thanks!!

Hi,
We have a scheduler with two views - a week view and a timeline view. When in the week view all events seem to show - however when in the timeline view any event that finishes on the day in question disappears. The start date does not seem to matter. For events that cross days they appear on any day that isnt the end date - so for example if i have an event that starts Monday through to Thursday the event will show on Monday, Tuesday and Wednesday but not Thursday. Navigating to Thursday does display the event briefly but then the event disapears.
The Razor code for the scheduler is:
@(Html.Kendo().Scheduler<F0CUSWeb.Models.PlanningScheduleViewModel>()
.Name("apptScheduler")
.AutoBind(true)
.HtmlAttributes(new { style = "height: 80vh;" })
.MajorTick(120)
.Editable(editable =>
{
editable.Destroy(false);
editable.Move(false);
editable.Resize(false);
editable.Confirmation(true);
})
.Views(views =>
{
views.TimelineWeekView(timeline =>
{
timeline.DateHeaderTemplate("<span class='k-link k-nav-day'>#=kendo.toString(date, 'ddd dd MMM yy')#</span>");
timeline.MajorTimeHeaderTemplate("<span class='k-link k-nav-day' style='font-size:12px'>#=kendo.toString(date, 'HH:mm')#</span>");
timeline.Title("Week View");
timeline.ColumnWidth(30);
timeline.MajorTick(480);
timeline.WorkDayStart(new DateTime(2010, 1, 1, 0, 0, 0));
timeline.WorkDayEnd(new DateTime(2010, 1, 1, 23, 59, 59));
timeline.ShowWorkHours(false);
});
views.TimelineView(timeline =>
{
timeline.DateHeaderTemplate("<span class='k-link k-nav-day'>#=kendo.toString(date, 'ddd dd MMM yy')#</span>");
timeline.MajorTimeHeaderTemplate("<span class='k-link k-nav-day' style='font-size:12px'>#=kendo.toString(date, 'HH:mm')#</span>");
timeline.Title("Day View");
timeline.StartTime(new DateTime(2010, 1, 1, 6, 0, 0));
timeline.EndTime(new DateTime(2010, 1, 1, 20, 0, 0));
timeline.ColumnWidth(20);
timeline.MajorTick(60);
});
})
.Events(e =>
{
e.DataBound("apptSchedulerBound");
e.Navigate("onSchedulerNavigate");
})
.DataSource(ds =>
{
ds.Events(events =>
{
events.Error("endAnimation");
});
ds.Read(read => read.Action("GetSchemeSchedule", "Planning").Data("schemeScheduleString"));
})
.Group(group => group.Resources("Gang").Orientation(SchedulerGroupOrientation.Vertical))
.Resources(resource =>
{
resource.Add(m => m.Gang)
.Title("Gang")
.Name("Gang")
.DataSource(ds => ds
.Custom()
.Transport(transport => transport.Read(read => read.Action("GetGangsForSchemePlanning", "Planning")/*.Data("getGangsForAppts")*/))
.Schema(s => s
.Data("Data")
.Total("Total")
.Model(m =>
{
m.Id("ID");
m.Field("Name", typeof(string));
})))
.Multiple(true)
.DataValueField("ID")
.DataTextField("Name");
})
.EventTemplateId("eventTemplate")
)
Any help would be appreciated as it is driving us mad!
Thanks