The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
Is it possible when adding a custom control in a cell (or range of cells) to adapt the control size to the cell(s) size ?
I have added my control by doing this:
e.Style.CellType := ''Control'';
grid.CoveredRanges.Add(GridRangeInfo.Cells(3,4,4,4));
e.Style.Control := PictureBox1;
(I would like that my picture fit exactly the two cells in which it is).
Verane.
ADAdministrator Syncfusion Team August 27, 2004 06:20 AM UTC
I think the control (pictureBox1) is automatically being sized to fit in the covered cell. (The grid can do this.) But it is the actual bitmap whose size you probably need to adjust, and the grid has no knowledge about what is in the control you are using. So, you will have to size the bitmap yourself somehow. You can use grid.RangeInfoToRectangle to get the size of the target rectangle you need. To see some techniques for sizing bitmaps, take a look at the Grid\Samples\DataBound\GridDataBoundImageCell sample. It sizes pcitures in a grid cell using vaious techniques.