I have implemented my custom column, inheriting from GridViewDecimalColumn. The code looks like this:
I am adding a DynamicDecimalColumn by using code like
The column is defined as filterable. When I start filtering by typing a filter text, the system is using a "contains" filter (LIKE) by default, and so I get an error. When I open the context menu to change the filter, the "Contains" filter ist not available, as expected. How can I change the initial filter by code, as I would like the "Equals" filter as the initial filter ?
Nicole
public class DynamicDecimalColumn : GridViewDecimalColumn, IDynamicColumn
{
public DynamicDecimalColumn(string fieldName, string attributeName)
: base(fieldName)
{
AttributeName = attributeName;
DataType = typeof(decimal);
}
protected override void Initialize()
{
base.Initialize();
}
public string AttributeName { get; set; }
public override Type GetCellType(GridViewRowInfo row)
{
if (row is GridViewDataRowInfo)
{
return typeof(DynamicPropertyCellElement);
}
return base.GetCellType(row);
}
}
I am adding a DynamicDecimalColumn by using code like
DynamicDecimalColumn column = new DynamicDecimalColumn
("OwnerCode" );
column.DecimalPlaces = 0
column.Name = "OwnerCode";
column.HeaderText = "OwnerCode";
_gridViewNetSegments.MasterTemplate.Columns.Add(column);
The column is defined as filterable. When I start filtering by typing a filter text, the system is using a "contains" filter (LIKE) by default, and so I get an error. When I open the context menu to change the filter, the "Contains" filter ist not available, as expected. How can I change the initial filter by code, as I would like the "Equals" filter as the initial filter ?
Nicole