当需要向用户显示打开某些默认参数的filtercontrol时,我需要知道如何将模式添加到filtercontrol 我尝试如下
[C#]Open in popup window
private void Padroes(ControleCaixaFiltro _controleCaixaFiltro, PropertyInfo prop)
{
CustomClauseNode clausula = new CustomClauseNode(_controleCaixaFiltro.Model);
FilterControlHelpers.ForceAdditionalParamsCount(clausula.AdditionalOperands, 1);
clausula.Operation = ClauseType.Equals;
clausula.FirstOperand = new OperandProperty(prop.Name);
clausula.ChangeElement(ElementType.Operation);
_controleCaixaFiltro.NoPrincipal.SubNodes.Add(clausula);
}
问题在于节点出现这种方式,但是您无法通过单击“x”侧删除它们
版本的devexpress是2012年
此代码不起作用
protected override ClauseNode CreateDefaultClauseNode(FilterColumn column)
{
ClauseNode defaultNode = base.CreateDefaultClauseNode(column);
if (defaultNode.AdditionalOperands.Count > 0)
{
OperandValue rightOperand = defaultNode.AdditionalOperands[0] as OperandValue;
if (rightOperand != null)
{
rightOperand.Value = DateTime.Now;
}
}
return defaultNode;
}