Telerik Forums
UI for ASP.NET Core Forum
1 answer
553 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
554 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
451 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
383 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
1 answer
604 views

I have a tile layout with 11 containers in it.  I need to set the background color of 3 of the tiles to a different color.  I am using .NET Core tag helpers.

I tried adding a class attribute to one of the <container> tags, but it had no effect. 

Aleksandar
Telerik team
 answered on 26 Apr 2022
1 answer
849 views

Hey guys,

currently I'm using the pdf viewer with jquery initializing. In my case I have a custom configured toolbar setup with custom messages (because the german culture file doesn't translate the pdf viewer at all).

My viewer is looking like that (I have marked the lines which I've no idea how to implement these in tag helper syntax):

$('#pdfViewer').kendoPDFViewer({
	messages: {
		toolbar: {
			download: 'Herunterladen',
			pager: {
				first: 'Zur ersten Seite',
				last: 'Zur letzten Seite',
				next: 'Zur nächsten Seite',
				previous: 'Zur vorherigen Seite'
			},
			togglePan: 'Schwenkmodus',
			toggleSelection: 'Markierungsmodus',
			zoom: {
				zoomIn: 'Hineinzoomen',
				zoomOut: 'Herauszoomen'
			}
		}
	},
	pdfjsProcessing: {
		file: {
			data: @Model
		}
	},
	toolbar: {
		items: [
			{ type: 'pager', input: false, previousNext: true },
			{ type: 'zoom', zoomInOut: true },
			'toggleSelection',
			// 'search',
			'download',
			// 'print'
		]
	}
}).data('kendoPDFViewer');

Now I'm trying to implement the widget via tag helper syntax but I've no idea how to configure my custom toolbar setup. Any ideas or is it even possible with tag helper?

<kendo-pdfviewer name="pdfViewer">
	<messages>
		<toolbar download="Herunterladen">
			<pager first="Zur ersten Seite"
				   last="Zur letzten Seite"
				   next="Zur nächsten Seite"
				   previous="Zur vorherigen Seite"/>
		</toolbar>
	</messages>
	<pdfjs-processing file="@Model"/>
	<toolbar>
		<pdfviewer-toolbar-items>
			...
		</pdfviewer-toolbar-items>
	</toolbar>
</kendo-pdfviewer>

Regards,

Daniel

Aleksandar
Telerik team
 answered on 26 Apr 2022
0 answers
114 views

Why and on what scenario would the form fields error state persist?

After an error, the validation summary and the error fields' messages get displayed. Clear event correctly renders (removes the validation messages). Then filling the correct values and submitting the form produces the expected result but also displays the field validation messages from the previous validation (the summary message do not).  So I created a clear handler as follows but it behaves the same:


function formClear(e) {
   const frm = $('#myForm').data('kendoForm');
   frm.clear();
   frm.validator.reset();  //introduced this as the above also did not behave correctly.
}

Francis
Top achievements
Rank 1
Iron
Iron
Iron
 asked on 25 Apr 2022
0 answers
153 views
How do I change the thickness of a donut chart? I'd like to make each group of a single series donut chart a different width/thickness.
Luke
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 22 Apr 2022
1 answer
401 views

We have a complex data model that has a nested complex property, for example:

public class Person
{
    string Name {get; set}
    Address Address {get; set;}
    public DateTime? Dob { get; set; }
    public bool? AuthToWork { get; set; }
... } public class Address { public string Street { get; set; } public string City { get; set; } public string State { get; set; } public string Zip { get; set; } public string Country { get; set; } }

I have a Wizard control in which I tried to get the content of the steps through the following: 

ContentUrl(Url.Action("someAction",  "myController",  Model))

I have two issues:

  1. The model is not being deserialized properly, the complete properties are not serialized--only the type name. I might be missing something, please let me know what I'm missing.
  2. The Action activates the server-side validation, which is not what we wanted. How can I prevent server-side validation?

We'll greatly appreciate any suggestions or pointers.

Many thanks

Mihaela
Telerik team
 answered on 21 Apr 2022
1 answer
1.0K+ views

Hi there,

I'm working with MVC Core Razor pages using Grid mode GridEditMode.InCell, Batch(true), ServerOperation(false) to pull data from database,  modified and save back to database.

Two of columns I'm dealing with define as bit data type and users want to see in the grid as Yes and No radio that they need to pick one option. What is the better way to handle this requests. Any samples? Thank you.

 

Stoyan
Telerik team
 answered on 19 Apr 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?