Kendo Grid validation message position issue

Tannya

The Kendo grid I developed has a validation message, but the arrow points to the column to the right. I cannot change anything in /kendo.default.min.css as this is located in a shared folder which should not be changed. Any help on this?

dataSource: {
  data: data.ReportData,
  schema: {
    model: {
      fields: {
        ProposedDiscount: {
          validation: { 
            required: true,
            proposeddiscountcvalidation: function (input) {
              if (input.val() != "" && input.is("\[name='ProposedDiscount'\]")) {
                  input.attr("data-proposeddiscountcvalidation-msg", "Should be whole number between 0 & 100");
                  // $('.k-widget k-tooltip k-tooltip-validation k-invalid-msg  .k-icon k-warning .k-tooltip-validation .k-callout-n').removeClass('.k-callout-n');
                  return input.val() >= 0 && input.val() < 101 && input.val() % 1 == 0;
              } else {
                  return true;
              }
            }
          }
        }

enter image description here

Joe Glover

You could try simply overriding some of the styles on the validation tool-tip. This works for me, though I've scoped it pretty tight to try to avoid any unexpected effects elsewhere. You might need to modify it slightly, depending on what version of kendo you're using:

<style>
    .k-grid .k-grid-content tr.k-grid-edit-row>td[role='gridcell'] .k-tooltip-validation>.k-callout-n {
        left: auto;
        margin-left: auto;
    }
</style>

Edit: I've just noticed you said you "cannot change anything in /kendo.default.min.css" - you shouldn't need to. This should override the default styles provided by kendo in that file. If you've got your own site-wide CSS file you could add it to that, or even just add it directly to the page hosting your grid (though that's not really recommended). Hope this helps.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Kendo upload validation message position

How to display Validation error message in controller using Kendo grid?

Kendo validation message in inLine Edit mode kendo grid not working through Data annotation

Confirmation delete message kendo grid

Kendo grid refresh issue in mobile

Kendo Grid: Toolbar template issue

Kendo Grid editable row issue

jQuery validation message issue

Kendo Grid Inline editing date range validation

Kendo-Grid column field validation

Adding custom validation to Kendo Grid display?

Kendo jQuery Inline Grid Validation is not working as needed

Setting scroll position on Kendo Angular Grid

Kendo Combobox Not Triggering Required Validation Message

Uncaught object error Kendo grid read issue

Kendo Grid inside Jquery Dialog with modal Issue

Date format issue in Kendo Grid with inline editing

Kendo Ui Grid Date time Convertion Issue

Kendo UI Grid Inline - Insert new row at a specific position on the grid

I want to issue a validation error message

How to catch client side jQuery validation errors for Kendo grid?

Validation doesn't work on KeyDown event of Kendo Grid UI in Jquery

kendo ui grid prevent posting data on client side validation error

MVC Validation Attributes Kendo Grid don't work with UIHint

Applying validation on email format in kendo UI grid in edit mode

How to configure custom validation rules for kendo grid editor

Telerik Kendo Grid Validation with Change Event using Ajax

Kendo UI Validation Error message being placed on wrong field

Display a message within the Kendo grid when it's empty