Validation messages on Datagrid

Hi. I have a datagrid where I'm using inline editing. It's basically a clone of another one I used and I've just changed the table being shown

I can see that the columns are being validated, and validation is failing when it should, but no messages are being displayed. I canot figure out why as everything is basically just copied.

Can you offer any ideas as to what might be preventing the messages from showing?

Cheers
Reg

Maybe there is some custom CSS that hides the validation? What rendered when you inspect the edited cell using browser dev tools inspector?

Good morning @enchev,

While I was trying out the inspection, I noticed that the validation messages were appearing when the page was shrunk in width?

I did some more playing, and the validation messages are showing, but are not visible unless I vertically scroll the datagrid to show them.

Here are two screenshots to illustrate:

Is there a way to make sure any validation messages are visible in this scenario?

Cheers
Reg

If you have a DataGrid with single row and vertical scrolling, you might need to get rid of the scrolling completely if you want to avoid such problems.

I don't have the vertical scrolling set. It only becomes visible when there's a validation message. And although in this example the grid only has one row, this issue also appears whenever the bottom row of a grid is edited inline - please see this screenshot.

I've scrolled the screen very slightly to show the message.

The overall height of the grid is obviously being changed in this scenario, but not its displayed height. This seems like a bug to me?

Cheers
Reg

If you have set height for the DataGrid you are forcing vertical scroll.

There is no height set, only width..

image

There is a vertical scroll so there must be something with height. Use your browser dev tools element/style inspector to check where the height is defined.

There is no vertical scroll until there is a validation message - it then appears. Here's the grid before I enter an invalid value..

And if I then enter an invalid value...

I have not, to my knowledge, set anything anywhere to cause this effect.

Cheers
Reg

I can only restate what I've already noted: there is a vertical scrollbar which will appear only if there is a height somewhere. Use the inspector to check it.

UPDATE: I was able to reproduce this behavior, unfortunately I don't have solution at the moment for this. We will update this thread if we find solution.

Ok, thank you @enchev.

I've just tried adding a footer template to one of the data columns. This actually is ok as a workaround to this problem, because it forces the grid to create a row below the bottom data row.

Maybe the problem could be solved with a similar approach where you force the addition of an empty row at the borrom of a grid?

Cheers
Reg

Defining min-height for the DataGrid can help as well.

:+1:

Thanks@enchev ..