开发者

BindingSource.Filter maximum length

开发者 https://www.devze.com 2023-04-01 11:48 出处:网络
I am using a BindingSource.Filter property to filter my DataGridView. I would like to ask what is the maximum length or size of this string property?

I am using a BindingSource.Filter property to filter my DataGridView. I would like to ask what is the maximum length or size of this string property?

An MSDN user wrote "Keep the size of the Filter pro开发者_Go百科perty limited. If it grows to large you might encounter "Stack Overflow" errors, which are very hard to trace back" but he didn't write what is the max. size.

http://msdn.microsoft.com/en-us/library/system.windows.forms.bindingsource.filter(v=vs.80).aspx

I am newby in this theme, so any help would be appriciated. Thanks, Zoltan


I encountered this problem as well when implementing a checked-filter list (similar to Excel column filtering). The stack overflow appears to be linked to the number of "OR" clauses more than to the overall length of the filter. If I replaced the OR with an IN statement I have filters of over 300,000 characters with no problems.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号