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

How create TextBox(Razor) type password?

@(Html.Kendo().TextBox().Name("Password").????)

Martin
Telerik team
 answered on 16 Nov 2020
5 answers
143 views

I now discovered that the messages for Spreadsheet are only available in English. Also, there is still no way to customize the toolbars other than showing and hiding them. After having much trouble with the Spreadsheet component in the last few days I get the impression that this will not be further developed. Although the response to the component has not been very great, it should at least work identically on all platforms, which is definitely not the case. 

Hey, Telerik, what's going on? Will this component be updated in the foreseeable future and brought to an acceptable level?

Regards
Heiko

Dimitar
Telerik team
 answered on 16 Nov 2020
11 answers
736 views

Hi there.

is there any bridge between SpreadSheet and SpreadProcessing or how can i load XLSX binary from database to that SpreadSheet widget  ??

i have checked this forum but i get gzip verson error.

 

Thanx in advance

Ahmed

Veselin Tsvetanov
Telerik team
 answered on 12 Nov 2020
5 answers
940 views

Hi,

I try to use the tag helpers with the upload control, but I'm not able to convert all the code du to the lack of documentation.

How to convert this code to use the tag helpers.

                        @(Html.Kendo().Upload()
                                                    .Name("files")
                                                    .HtmlAttributes(new { aria_label = "files" })
                                                    .Validation(validation => validation.AllowedExtensions(new string[] { ".pdf", ".jpg", ".png" }))
                                                    .Validation(validation => validation.MaxFileSize(10485760))
                                                    .Files(files =>
                                                    {
                                                        if (Model != null && Model.AttachedFiles != null)
                                                        {
                                                            foreach (var f in Model.AttachedFiles)
                                                                files.Add().Name(f.fileName).Extension(System.IO.Path.GetExtension(f.fileName)).Size(f.length);
                                                        }
                                                    })
                                                    .Async(async => async
                                                        .Save("SaveFilesAsync", "Controller")
                                                        .Remove("RemoveFiles", "Controller"))
                                                    .Events(events => events
                                                    .Select("onSelect"))
                        )

 

 

 

Heiko
Top achievements
Rank 1
Iron
Veteran
 answered on 12 Nov 2020
1 answer
218 views

Hello,

I have a grid and I display tooltips on some of its columns. It works OK. I also have a DropdownList. After DropdownList change I read data for the grid again. The grid then shows new data, but the tooltips are never visible.

This is the function for DropDownList change event:

function ViewChanged() {
  $('#AccountGrid').data('kendoGrid').setOptions(initialAccountGridOptions);
  $('#AccountGrid').data('kendoGrid').dataSource.filter({});
  $('#AccountGrid').data('kendoGrid').dataSource.read();
}

I figured out that the tooltips are displaying when I delete the first line with setOptions function. But I need the setOptions function.

Is there a way how to use this function and still see the tooltips?

Thanks for answers.

Aleksandar
Telerik team
 answered on 12 Nov 2020
1 answer
1.4K+ views
I need to suppress/hide the submit button rendered along with the rest of the form when using Html.Kendo().Form(), but cannot see a property that will allow me to do so. My reasoning for this is I have a requirement to render a Tabstrip that will feature multiple tabs with different inputs that will all be submitted together. I want to hide the submit button from each of these Forms, and simply create my own submit button underneath that will call a JS function that will generate a form from all the various inputs and submit that as a single post. I know that I can simply collapse the buttons using a custom style, but I'd rather do it programmatically via the Kendo call instead.
Dimitar
Telerik team
 answered on 12 Nov 2020
1 answer
449 views

I've searched in the documentation but haven't been able to solve this problem so far:

I want to use the drawer component as a global navigation menu. This means that the drawer items should be clickable and redirect to different views within the solution and the view should be rendered inside the content section. 

in regards to the first problem, which is that the items should be clickable i have my template setup like this:

    @(Html.Kendo().Drawer()
    .Name("drawer")
    .Template(@"
    <ul>
        <li data-role='drawer-item'><a asp-controller='Home' asp-action='Index'>First Item</a></li>
        <li data-role='drawer-separator'></li>
        <li data-role='drawer-item'>Second Item</li>
    </ul>")
    .Mode("push")    
    )

but using the asp helpers is not working. 

and regarding showing the view inside the .content, i don't know how to make that work.

Any help will be appreciated.

 

 

Anton Mironov
Telerik team
 answered on 10 Nov 2020
2 answers
551 views

I have a fairly simple Kendo Grid in a Razor page that posts to its Model via Ajax

All the parameter on the grid are set correctly (Forgery Token, etc). Also set the right camel case in startup.cs:

                .AddNewtonsoftJson(options => options.SerializerSettings.ContractResolver = new DefaultContractResolver())
                .AddJsonOptions(options => options.JsonSerializerOptions.PropertyNamingPolicy = null); 

The post successfully hits the OnPostUpdate function but the class only has empty members:

If I access the Form via the Request object (not the "request" object), I can see all members correctly posted but the "doesnotwork" instance only contains empty fields as if the deserialization did not work correctly.

        public JsonResult OnPostUpdate([DataSourceRequest] DataSourceRequest request, hrFeedback doesnotwork)
        {
            hrFeedback tFeedback=null;
            try
            {
                var t=CU.CGuid(Request.Form["FeedID"]);
                tFeedback = _context.tblFeedback.Where(s => s.FeedID == t).FirstOrDefault();
                if (tFeedback != null)
                {
                    tFeedback.Feedback = Request.Form["Feedback"];// feedback.Feedback;
                    tFeedback.FollowedUp = Request.Form["FollowedUp"]; // feedback.FollowedUp;
                    tFeedback.Subject = Request.Form["Subject"]; // feedback.Subject;
                    tFeedback.Unsubscribe = CU.CDate(Request.Form["Unsubscribe"]).DateTime; // feedback.Unsubscribe;
                    _context.tblFeedback.Update(tFeedback);
                    _context.SaveChanges();
                }
                else
                    return new JsonResult(Content("Feedback ID not found")); //Is there a better way to tell the grid that the update failed?
            }
            catch (Exception e)
            {

            }
            return new JsonResult(new[] { tFeedback }.ToDataSourceResult(request, ModelState));
        }

 

I also assume that my OnPostRead does not work right as I can see the filter/sort coming in via Request.Form["filter"] but the ToDataSourceResult seems not to take these values as the result on the page never shows filter or search results (always all rows are displayed)

        public JsonResult OnPostRead([DataSourceRequest] DataSourceRequest request)
        {
            var t = new JsonResult(_context.tblFeedback.ToDataSourceResult(request));
            return t;
        }

 

Can anybody tell me what I am forgetting?

I have another page that works just fine using the OnPostUpdate and its class value but I cannot see any difference between the two

 

Thanks

Nikolay
Telerik team
 answered on 10 Nov 2020
3 answers
135 views
I have been trying to find a way to only show one row detail expanded at a time.  I found some code in Kendo UI for jquery but it does not see to work.  Does anyone have any idea what I am doing wrong?
var lastContactId;
    function onShowDetail(e) {
        lastContactId = e.sender.dataItem(e.masterRow).ContactId;
 
        // collapse all but current
        var currentRow = e.masterRow;
        var grid = $('#grid_client_contact').data('kendoGrid');
        var masterRows = grid.table.find('tr.k-master-row');
        console.log(masterRows);
        var mappedRows = $.map(masterRows, function (row, rowIndex) {
 
            if ($(row).find("a.k-minus").length > 0 && !$(row).is(currentRow)) {
                console.log(row);
                return $(row);
            }
            return null;
        });
        console.log(mappedRows.length);
        for (var i = 0; i < mappedRows.length; i++) {
            grid.collapseRow(mappedRows[i]);
            console.log(i);
        }
    }
Carlos
Top achievements
Rank 1
 answered on 10 Nov 2020
1 answer
209 views

Hello,

I am developing a wizard very similar to the one you provide in this demo: https://demos.telerik.com/aspnet-core/wizard/index . I wonder if you could help me to find out how to send the model back to the controller after clicking on done. Do you have to send the data with ajax or can you send the model back to the controller? Sorry if this question is too obvious, I am just starting.

Kind Regards,

Pablo

Marconi
Top achievements
Rank 1
Veteran
 answered on 08 Nov 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?