how can i get a control or a usercontrol as a cell. I tried something like that, but it didn’t work
PictureBox pictureBox = new PictureBox(); pictureBox.Image = global::TestWiseJ.Properties.Resources.A1; row.Cells.Control = pictureBox; row.Cells.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; MyUserControl u = new MyUserControl(); row.Cells.Control = u; row.Cells.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
Placing controls inside a cell is not yet supported. From the code above looks like you want to place an image. You can place an image in any cell using the cell’s Style property and BackgroundImage properties.
The datagridview in Wisej is a very efficient widget, only the visible elements are generated in the browser and they are generated as plain HTML. It’s a lot lighter to use the cell renderers when possible instead of placing an actual widget inside the cells.
Please login first to submit.