Hello,
I am facing a problem with the ultragrid. I have placed an image in a cell like this:
e.Row.Cells["Image"].Value = resources.testimage;
The image is shown, all good, but when i resize one of the other columns in the grid, the image in the cell is resizing too.I disabled this by setting the min and maxwidth for the cell and indeed the image isnt resized anymore.
But when the ultragrid initial has a lot of columns, the image in the cell is still small compared to the image in another grid.
For examples see the images below.
Can anyone help me?
Thanks,
Kevin
Thanks Mike,
setting the CellPadding property did the trick.
Hi Kevin,
Hm, that's odd. There must be something different in the settings of the first grid that is causing there to be less available space in the cell, even though the rows are the same size. The only thing that comes to mind immediately that might cause this is the CellPadding property. But there may be other factors that would do it.
There's no way to turn off the scaling, except by using a CreationFilter to make the ImageUIElement bigger. I could help you with that CreationFilter if you like, or if you can send me a small sample project showing the problem (where the images are being scaled down), I could tell you why it's happening. Maybe you could reduce the project down to a single form with just the grid and same fake data?
Hi Mike,
Thanks for your answer. Increasing the row is indeed scaling the image, but in my opinion both rows in the screenshot are the same height. Checked this too btw.Is there anything that can be done about the scaling and can you tell me why it is scaling?
Thanks.
The images in the first screen shot you posted here appear to be scaled down because of the height of the row. Set MinWidth on the column would not help you there. You may want to also set MinRowHeight on the Override to enforce a minimum height on the row.