Hi.
How can i customize the textbox inside the filter cell?
I want the borders of this textbox to appear all the time, not just when in edit mode.
The filter row and filter cell are easy to customize. private void rgvCompanyList_ViewRowFormatting(object sender, RowFormattingEventArgs e)
{
if (e.RowElement is GridFilterRowElement)
{
e.RowElement.RowInfo.Height = 40;
e.RowElement.BorderBoxStyle = BorderBoxStyle.FourBorders;
e.RowElement.BorderWidth = 4;
e.RowElement.BorderColor = Color.Red;
}
}
private void rgvCompanyList_ViewCellFormatting(object sender, CellFormattingEventArgs e)
{
if (e.CellElement is GridFilterCellElement)
{
e.CellElement.DrawBorder = true;
e.CellElement.BorderBoxStyle = BorderBoxStyle.FourBorders;
e.CellElement.BorderWidth = 2;
e.CellElement.BorderColor = Color.Red;
Font font = new Font(e.CellElement.Font.Name, 9, FontStyle.Bold);
e.CellElement.Font = font;
e.CellElement.TextAlignment = ContentAlignment.MiddleCenter;
}
}
But I couldn't find how to access the text box inside the cell.
I want the borders of this text box to be always visible, as seen in the image below.