Telerik Forums
UI for ASP.NET Core Forum
1 answer
603 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
847 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
152 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
400 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
1 answer
228 views

I notice in the sample for Server filtering (see below) of the Core Dropdown list the filter is Case Sensitive.  e.g. if I type in 'chef' ir will not find 'Chef'.  How can I make it NOT case-sensitive.  The Client side filter is not case-sensitive, only the server side.

see example Server filtering in ASP.NET Core DropDownList Component Demo | Telerik UI for ASP.NET Core

Aleksandar
Telerik team
 answered on 18 Apr 2022
1 answer
624 views

I'm trying to build an interface where I change the grid's datasource based on a drop down.  The datasource is dynamic (meaning I don't know what columns will returned).

If I use the kendo.data.DataSource set to a static set of JSON data, it populates during the on_change event properly. 

If I use an external source... nothing happens.  The data is fetched from the server, but nothing renders.  I'm really stuck.  

I dumbed it down to raw basics... but still no progress.  Can someone spot my mistake or give me advice?  

I suspect something to do with the DataSourceRequest parameter.... but I can't spot it.

Thanks!

Sam

 

 @(Html.Kendo().Grid<dynamic>()    
            .Name("logViewGrid")
            .Pageable(pager => pager
                    .Input(false)
                    .ButtonCount(4)
                    .PageSizes(new int[] {5, 10, 20, 100, 500})
                    .AlwaysVisible(false)
            )
            .Sortable()
            .ToolBar(t => {
                    t.Excel();
                    t.Search();
            })
            .Excel(excel => excel
                .AllPages(true)
            )
            .Scrollable()
            .Filterable(ftb => ftb.Mode(GridFilterMode.Menu))
            .HtmlAttributes(new { style = "height:430px;" })
           
        )

 

<script>

 var logDataSource2 = new kendo.data.DataSource({
            data: [
                { name: "John Doe", age: 33 },
                { name: "Joe Smith", age: 55 }
            ]
        });

    var logDataSource;

    function logViewDropdown_change() {
       var value = $("#logViewDropdown").val();
       if (value != "")
       {
           logDataSource = new kendo.data.DataSource({
                                type: "odata",
                                serverFiltering: true,
                                serverPaging: true,
                                serverSorting: true,
                                pageSize: 10,
                                transport: {
                                    read: {
                                        url: "/Log/GetLogDataForOne" 
                                    }
                                }
                            });   

            var grid = $("#logViewGrid").data("kendoGrid");
            grid.setDataSource(logDataSource); // this works if I set it to logDataSource2

       }

</script>

 

Here's my test controller:

    [Authorize(Roles = "Log Admin")]
    public IActionResult GetLogDataForOne([DataSourceRequest] DataSourceRequest request)
    {
        System.Collections.Generic.IEnumerable<dynamic> dynamicList;
        dynamicList = Global.SqlDataAccess.GetDynamicData("SELECT TOP 2 ActivityInformation FROM log.WebsiteActivity");
        return Json(dynamicList.ToDataSourceResult(request)); //
    }
Aleksandar
Telerik team
 answered on 18 Apr 2022
1 answer
99 views

My employer prefers us not to use cdns when possible.  I noticed that when I choose not to use the cdns the Telerik Visual Studio extension downloads alot of files into the project.   Included in this is every theme offered and all its files including images.  

Is there a way to just grab the bare minimum for things to work and not download any extra themes since I use one that I created inside of Telerik's theme builder?

Tsvetomir
Telerik team
 answered on 12 Apr 2022
1 answer
116 views

I have a maintenance grid for data where one of the columns is an "Archived?" column which should be read-only when adding a new record or editable otherwise - database/data layer will default the value to false in any case. How can I achieve that? The relevant column in my grid is defined as follows:


            columns.Bound(t => t.IsArchived).ClientTemplate("<input type='checkbox' onclick='return false;' #= IsArchived ? checked='checked' : '' # />").HtmlAttributes(new { style = "text-align: center;" }).HeaderHtmlAttributes(new { style = "text-align: center;" }).Width(140);

Tsvetomir
Telerik team
 answered on 11 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
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
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?