“?"的目的是什么? strfilter [英] What is the purpose of " strfilter "

查看:106
本文介绍了“?"的目的是什么? strfilter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您能解释"strfilter"的目的吗?

Can you explain the purpose of "strfilter"?

推荐答案

使用改进"按钮而不是使用注释来使用代码更新您的问题.

您的情况 strfilter 应该是字符串.
ParentId 是表中的列名,并根据Convert.ToString(parentid);中的值从表中过滤出行.
Update your question with code using the improve button instead using a comment.

In your case strfilter should be a string.
ParentId is the column name in table and based on the value in Convert.ToString(parentid); the rows are filtered from the table.


在您评论自己的代码时问题我对您的问题有了更多的了解.

StrFilter只是一个简单的string对象,该对象存储格式化的条件,可将其应用于基于的数据表中的过滤rows.

就像你愿意做的一样

As you''ve commented into your question I got little bit more understanding regarding your question.

StrFilter is nothing but a simple string object which stores formatted condition that can be applied for filtering rows in datatable based on.

Like if you will do

string StrFilter = "ParentId="+Convert.ToString(parentid);



然后对于样本,如果您想在父母ID = 3上找到,则格式化后的字符串将是.



Then for the sample if your you want to find on parant id = 3 then your formatted string will be.

StrFilter = "ParentId=3";



将过滤器应用于数据表后,您将获得所有具有ParentId = 3的行.

希望您现在对此很清楚.



After applying filter to datatable you will get all the rows having ParentId = 3.

I hope you''re quite clear with it now.


这篇关于“?"的目的是什么? strfilter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆