public class CustomMultiColumnControl : SfMultiColumnDropDownControl
{
protected override bool FilterRecord(object item)
{
var _item = item as SalesByYear;
var result = (_item.Name.Contains(this.SearchText));
return result;
}
} |
public class GridCellMultiColumnDropDownRendererExt : GridCellMultiColumnDropDownRenderer
{
public GridCellMultiColumnDropDownRendererExt()
{
}
protected override SfMultiColumnDropDownControl OnCreateEditUIElement()
{
return new CustomMultiColumnControl();
}
} |
public class SfDataGridBehavior : Behavior <SfDataGrid>
{
protected override void OnAttached()
{
base.OnAttached();
this.AssociatedObject.CellRenderers.Remove("MultiColumnDropDown");
this.AssociatedObject.CellRenderers.Add("MultiColumnDropDown", new GridCellMultiColumnDropDownRendererExt());
}
} |