Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9083315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:44:48+00:00 2026-06-16T20:44:48+00:00

I have a Kendo UI grid with a custom column as such: columns.Template(@<text></text>) .Width(50)

  • 0

I have a Kendo UI grid with a custom column as such:

columns.Template(@<text></text>)
              .Width(50)
              .ClientTemplate("#= getDeleteHTML(Id, DisplayLocation) #");

It calls a js function to build the html to inject as a form to submit for a delete:

function getDeleteHTML(itemId, itemName) {
        var deleteHtml = "<form action='"+ '@Url.Action("Delete", "ManageLocations")'+"/" + itemId +"' method='post'>"
                            + "<input type='image' onclick='return confirm(\"Are you sure you wish to delete: \r\n" + itemName + "?\");' value='Delete' class='delete' src='../Images/transparent.gif'>"
                        + "</form>";
        return deleteHtml;
    }

I want to break the confirmation message into 2 lines. I’ve tried \r\n and @Environment.NewLine + itemName as I’m not sure which parser is being used (client or server) in this case.

How can I achieve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T20:44:49+00:00Added an answer on June 16, 2026 at 8:44 pm

    Have you tried moving confirmation to another function

    function getDeleteHTML(itemId, itemName) {
            var deleteHtml = "<form action='"+ '@Url.Action("Delete", "ManageLocations")'+"/" + itemId +"' method='post'>"
                 + "<input type='image' onclick='confirmDelete(" + itemName + ")' value='Delete' class='delete' src='../Images/transparent.gif'>"
                 + "</form>";
            return deleteHtml;
        }
    
    function confirmDelete(itemName) {
       return confirm("Are you sure you wish to delete: \n" + itemName + "?");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a kendoUI grid. @(Html.Kendo().Grid<EntityVM>() .Name(EntitesGrid) .HtmlAttributes(new { style = height:750px;width:100%;scrollbar-face-color: #eff7fc; })
I have a Kendo Grid in MVC4 that is working fine: Html.Kendo().Grid<SearchUserResultViewModel>() .Name(Grid) .Columns(columns
I have a simple Grid in a MVC4 [ChildAction]. @(Html.Kendo().Grid(Model) .Name(Grid) .Columns(columns => {
I have a Kendo Grid for MVC and I have added a custom command
I have used Kendo grid, I need to select a row without command columns.
I have an Ajax.ActionLink inside a Kendo Grid Template. I want to click the
I would like to have a DateTime column in my Kendo UI grid. I've
I have a kendo grid in mvc with column property .Encoded(false) In the controller
I have a problem to configure the Kendo-Ui with Combo-box with custom values. I
I have a kendo grid in my view named Grid and I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.