Placement of the Edit Control
When an edit control is made visible, its initial height will be the same as the entire line item. If the control has defined column objects, or if the EditAutoSize property is false, the width of the edit label will be the same as the column or control from where the actual text starts. If no columns are defined, and the EditAutoSize property is true, the width is determined by the width of the text.
There may be times when the size and placement of the edit label is not acceptable. If that is the case, the developer can change the size and placement of the edit label in the BeforeCellEdit event. The code below illustrates how to cause the edit label to be vertically centered in a line item along with being the same height as the text.
C#
void dbicList1_BeforeCellEdit(object sender, Dbi.WinControl.BeforeCellEditEventArgs e)
{
e.Y += 8;
e.Height -= 16;
}
VB.NET
Private Sub dbicList1_BeforeCellEdit(sender As System.Object, e As Dbi.WinControl.BeforeCellEditEventArgs) Handles dbicList1.BeforeCellEdit
e.Y = e.Y + 8
e.Height = e.Height – 16
End Sub