如何通过代码的方式设置某列的默认过滤条件? #3257
Answered
by
SeptSkyTime
SeptSkyTime
asked this question in
Q&A
-
在官网的表格示例代码中,有类似的例子,然而在我的代码中执行时,发现column.Filter为null,此时该如何通过代码创建Filter的实例?
谢谢! |
Beta Was this translation helpful? Give feedback.
Answered by
SeptSkyTime
Apr 11, 2024
Replies: 1 comment 1 reply
-
@SeptSkyTime 代码太少,太片面,根本无法推断问题点在哪里。可以提供一个仓库复现问题。 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我通过对比验证:
如果在按钮事件中调用SetDefaultFilterInCode方法,column.Filter不为null,如果在页面加载事件OnAfterRenderAsync中,在firstRender为true时调用该方法,column.Filter为null。改为firstRender为false时调用,就可以了。
感谢提示!