Telerik Forums
UI for ASP.NET Core Forum
1 answer
143 views

Hello,

We are using custom grid popup forms for adding/updating records, and some fields have server validations, and are using the solution described here:

https://docs.telerik.com/aspnet-core/knowledge-base/grid-popup-editing-show-server-validation-errors?_ga=2.158091705.2007812860.1650987718-278551097.1647285099

This works great for displaying the validation message, but the problem we are having is that using this method doesn't change the associated control's border to red ("k-invalid") like the automatic client-side validation does for invalid entries. (Screen shots attached to show difference)

Is there a known or relatively easy way to accomplish this?  I realize that some controls, like dropdowns or date pickers, apply the k-invalid class to different html elements within the control, so this might be too tricky to solve. 

At the end of the day, this is not a major issue, although it does add inconsistency and a small level of accessibility concern to the popup forms. Any suggestions are welcome and appreciated!

Thanks!

Tony

Tsvetomir
Telerik team
 answered on 02 May 2022
1 answer
306 views

Hi there,

I am having trouble configuring the Grid sort by group aggregate. I was following the tutorial( https://docs.telerik.com/kendo-ui/knowledge-base/grid-sort-group-by-group-aggregate ) that was done in jQuery, but I didn't manage to configure the grid properly. Can someone share the same configuration in .NET Core?

Thanks.

Georgi
Telerik team
 answered on 02 May 2022
0 answers
174 views

Hello,

I have an existing project where I am trying to use the PDF Viewer control. But in this project I have a JS file callled vendors.bundle.js wich is causing some type of conflict with kendo.all.min.js, making an error of "kendoPDFViewer is not a function" appear at the console.

I have tried putting the scripts references at different points of the application other then the page itself, but that only caused more errors.

I removed the reference to the file vendors.bundle.js, but that made several parts of the project stop working.

So, my question is how do I find out what kind of conflict is this, and how to solve it.

Regards,

Alexandre

Alexandre
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 01 May 2022
1 answer
969 views
               

I need to format the number in Grid as $123.00 or $123.25. The input comes from a modal form.

ViewModel has these values as Double.

Neither format attempts are working, the numbers are displayed as entered.

So if the user entered 1, it should display as $1.00, but instead it displays as 1.

columns.Bound(p => p.MyNumericValue).Title("MyTitle").ClientTemplate("#= kendo.toString(MyNumericValue, '{0:0.00}') #");
 columns.Bound(p => p.MyNumericValue).Title("MyTitle").Format("{0:0.##}");

 

Thanks.

Tsvetomir
Telerik team
 answered on 29 Apr 2022
1 answer
559 views

Hello, in the columns grid, the HeaderHtmlAttributes() function no longer works.

It no longer works if you put a style. example. HeaderHtmlAttributes(new { style = "text-align: center" }).

The demo does not work
https://demos.telerik.com/aspnet-core/grid/cell-alignment

Thanks,

   Jose


Mihaela
Telerik team
 answered on 29 Apr 2022
1 answer
3.4K+ views
I wonder if the Form items can be added and removed dynamically in razor pages. Please take a look at the demo of Form from DevExpress at https://demos.devexpress.com/ASPNetCore/Demo/Form/UpdateItemsDynamically/. As you can see, the phone entry can be added and removed dynamically. I would like to leverage Telerik's Form similar to that demo. Looking at the DevExpress demo source, I don't think it would not be difficult with Telerik's Form, but I can't find any example for that. I truly appreciate any advice you can provide.
Mihaela
Telerik team
 answered on 27 Apr 2022
1 answer
617 views

When in Hierarchy view .. how can I Add/Update/Delete both Master and Detail?

Alexander
Telerik team
 answered on 27 Apr 2022
1 answer
579 views

I've been following this Kendo UI tutorial: Server filtering in ASP.NET Core AutoComplete Component Demo | Telerik UI for ASP.NET Core

But although I've made the changes I believe need to be to accommodate our data, no textbox for the user to type ahead into appears. Then looking at the code and especially at the model class, I realized that the field I'm trying to bind to the dataTextField property of kendo-autocomplete, is a nullable string. I'm wondering if that is what's causing the problems I'm experiencing? Here's some code snippets from my MVC view:


<div class="demo-section k-content">
	<h5>Find a location</h5>
	<kendo-autocomplete name="locations" style="width:100%"
		dataTextField="LocationCode"
		filter="contains"
		min-length="2">
		<datasource type="DataSourceTagHelperType.Custom" server-filter="true">
			<transport>
				<read url="@Url.Action("GetLocationByLocationCode", "SiteToSite")" data="onAdditionalData" />
			</transport>
		</datasource>
	</kendo-autocomplete>

	<div class="demo-hint">Hint: type "ca"</div>
	<script>
		function onAdditionalData() {
			return {
				text: $("#locations").val()
			};
		}
	</script>
</div>

Here's the Index action method from the controller:


public async Task<IActionResult> Index()
{
	BuildSelectLists();
	SiteToSite siteToSite = new SiteToSite();
	return View(siteToSite);
}

public void BuildSelectLists()
{
	ViewData["EmployeeList"] = new SelectList(db.PharmEmployees.Where(x => x.ActiveYn == true).OrderBy(y => y.EmployeeName).ToList(), "EmployeeId", "EmployeeName");
}

And finally here's a snippet of the PharmLocation model class, which includes LocationCode (which is the nullable string I'm binding the dataTextField to:


public partial class PharmLocation
{
    public PharmLocation()
    {
        PharmItemsReturnedExpiredFromLocs = new HashSet<PharmItemsReturnedExpiredFromLoc>();
        PharmLocation340BRegistrations = new HashSet<PharmLocation340BRegistration>();
        PharmLocationPaprogContracts = new HashSet<PharmLocationPaprogContract>();
    }

    public int LocationId { get; set; }
    public bool? ActiveYn { get; set; }
    public string? LocationCode { get; set; }
    public string? LocationType { get; set; }
    public string? Location { get; set; }
Could the fact that LocationCode is a nullable string be what's preventing the autocomplete from displaying a textbox that the user can type ahead into?
Aleksandar
Telerik team
 answered on 27 Apr 2022
1 answer
525 views

In 'Grouped' grids .. is there a way to say 'select all items in one Group?

Aleksandar
Telerik team
 answered on 27 Apr 2022
2 answers
417 views

Hey guys,

in my project i'm using a horizontal kendo menu for navigation through the app. Since the page has to be responsive I have to enable the scroll feature. I do prefer the centered styling and here I'm running into an issue.

<div style="display: flex; flex-flow: column;">
	<nav>
		<kendo-menu name="menuNavigation" style="justify-content: center;">
			<scrollable enabled="true" />
			<items>
				<menu-item text="@Namings.Request stellen">
					<sub-items>
						<menu-item text="@Namings.CustomerDepartment"></menu-item>
						<menu-item text="@Namings.CustomerPrivatPerson"></menu-item>
						<menu-item text="@Namings.CustomerClub"></menu-item>
					</sub-items>
				</menu-item>
				<menu-item text="@Namings.OpenRequests"></menu-item>
				<menu-item text="Laufende @Namings.Data.Loans"></menu-item>
				<menu-item text="Fahnenlager"></menu-item>
				<menu-item text="Kundendaten">
					<sub-items>
						<menu-item text="Personen">
							<sub-items>
								<menu-item text="@Namings.Crud.Read"></menu-item>
								<menu-item text="@Namings.Crud.Create"></menu-item>
								<menu-item text="@Namings.Crud.Update"></menu-item>
								<menu-item text="@Namings.Crud.Delete"></menu-item>
							</sub-items>
						</menu-item>
						<menu-item text="@Namings.CustomerClubs">
							<sub-items>
								<menu-item text="@Namings.Crud.Read"></menu-item>
								<menu-item text="@Namings.Crud.Create"></menu-item>
								<menu-item text="@Namings.Crud.Update"></menu-item>
								<menu-item text="@Namings.Crud.Delete"></menu-item>
							</sub-items>
						</menu-item>
					</sub-items>
				</menu-item>
				<menu-item text="Einstellungen">
					<sub-items>
						<menu-item text="Fahneneinstellungen & Preise"></menu-item>
						<menu-item text="Archivierte @Namings.Data.Loans"></menu-item>
					</sub-items>
				</menu-item>
			</items>
		</kendo-menu>
	</nav>
</div>

When the screen has smaller sizing, the left items of the menu will disappear without showing the scroll-to-the-left button. Scrolling to the right is still working. But the first items will be not reachable again.

This behaviour is caused by the marked line "justify-content: center". It enables that the menu items are centered but the scrolling functionality will be not working properly anymore.

I'm not the greatest css programmer, do you have an idea how to enable proper working scrolling for centered menu items?

Daniel
Top achievements
Rank 3
Iron
Iron
Iron
 updated answer on 26 Apr 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?