P
plepko1
Guest
My problem is that after clicking on the cell of the datagridview control it calls a ComboBox drop-down list. Everything was ok until I added my own drawing model - the problem is with the ComboBox control - its height is smaller than the height of the DataGridView cell. How to set ComboBox height to - dataGridView1.Rows[e.RowIndex].Cells[1].ContentBounds.Height?
myComboBox.DrawMode = DrawMode.OwnerDrawFixed;
myComboBox.DrawItem += (src, ev) =>
{
ev.DrawBackground();
//code...
ev.DrawFocusRectangle();
};
This code don't work:
myComboBox.Height = dataGridView1.Rows[e.RowIndex].Cells[1].ContentBounds.Height;
Continue reading...
myComboBox.DrawMode = DrawMode.OwnerDrawFixed;
myComboBox.DrawItem += (src, ev) =>
{
ev.DrawBackground();
//code...
ev.DrawFocusRectangle();
};
This code don't work:
myComboBox.Height = dataGridView1.Rows[e.RowIndex].Cells[1].ContentBounds.Height;
Continue reading...