C1DataGrid DataGridFilterRow Custom Watermark
Would be nice to be able to change the watermark verbiage in the DataGridFilter row. Changing it from "Type here to filter" to something else.

2 comments
-
C1_Antihero commented
Hello Chris,
We have added Watermark property of DataGridFilterRow. It's much easier for users to change the Watermark as they want. This property will be available in 2016v1 which is around March, 2016.
Thanks again for your suggestion!Henry
-
C1_Antihero commented
Hello Chris,
Many thanks for your suggestion!
I think we should expose a Watermark property of DataGridFilterRow for users. I think this will be available for uses in 2016v1 release around March. I suggest to customize one DataGridFilterRow class which is inherited from DataGridFilterRow to implement such request.
The pseudo codes are like the following:
public class MyDataGridFilterRow : DataGridFilterRow
{
protected override FrameworkElement CreateCellContent(DataGridColumn column)
{
var filterTextBox = new C1TextBoxBase();
filterTextBox.Watermark = "Welcome to China";
filterTextBox.Tag = column;
filterTextBox.BorderThickness = new Thickness();
filterTextBox.CornerRadius = new CornerRadius();
filterTextBox.SetBinding(C1TextBoxBase.BackgroundProperty, column.DataGrid, dg => dg.RowBackground);
filterTextBox.SetBinding(C1TextBoxBase.ForegroundProperty, column.DataGrid, dg => dg.RowForeground);
filterTextBox.SetBinding(C1TextBoxBase.BorderBrushProperty, column.DataGrid, dg => dg.BorderBrush);
filterTextBox.SetBinding(C1TextBoxBase.FocusBrushProperty, column.DataGrid, dg => dg.SelectedBackground);
filterTextBox.SetBinding(C1TextBoxBase.MouseOverBrushProperty, column.DataGrid, dg => dg.MouseOverBrush);
filterTextBox.SetBinding(C1TextBoxBase.TabIndexProperty, column, col => col.DisplayIndex);
return filterTextBox;
}
}
And you can use it in your application.Thanks,
Henry