Skip to content

Edit Command Column UpdateText property Does Not Accept All Values #7806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
PMcDonough11 opened this issue Apr 22, 2024 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@PMcDonough11
Copy link
Contributor

Bug report

When the Columns.Command.Edit.UpdateText property is set to Update, the text will not be modified and will remain as the default value Save.

Reproduction of the problem

@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.ProductViewModel>()
    .Name("grid")
    .Columns(columns =>
    {
        columns.Command(command => { 
            command.Edit().UpdateText("Update");  //Will not work
        }).Width(250);
    })
    //....
)

REPL
https://netcorerepl.telerik.com/wIuyvtcO41rAa82G36

Expected/desired behavior

The text should change to the specified content within UpdateText.

Workaround

Set the text via JavaScript using the setOptions method and columns.command.text:

        $(document).ready(function(){
            var grid = $("#grid").data("kendoGrid");
            var options = grid.getOptions();
            //set the text for the first command in the last column
            // as shown in the second example on:
            //https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.command#columnscommandtext
            options.columns[4].command[0].text = { edit: "Edit", update: "Update" };
            grid.setOptions(options);
        });

REPL
https://netcorerepl.telerik.com/wIYeGmOz39LL8mHN26

Environment

@github-actions github-actions bot added the FP: Unplanned Sync status with associated Feedback Item label Apr 22, 2024
@aleksandarevangelatov aleksandarevangelatov self-assigned this Apr 22, 2024
@github-actions github-actions bot added FP: Completed Sync status with associated Feedback Item and removed FP: Unplanned Sync status with associated Feedback Item labels May 9, 2024
@aleksandarevangelatov aleksandarevangelatov added this to the 2024 Q2 (May) milestone May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants