C# - Call a Function from other script
Hi everyone i wrote a SoketServer with C# 2005 Express for my explication and its work fine .
when i revise a message in Soket.cs script , i realize it and call this functio开发者_StackOverflow社区n in mainform.cs .
public void AdverFilter(string value)
{
MessageBox.Show("Adver"+value);
this.adverBindingSource.Filter = "store_index Like '*" + value + "*'";
//MessageBox.Show(this.adverBindingSource.Filter);
}
message box show true filter value but adverbindingsourse dont filter my table...
Note : i create button and wrote this code and click it after AdverFilter function start but its show non value for adver filter...
private void button3_Click(object sender, EventArgs e)
{
MessageBox.Show(this.adverBindingSource.Filter);
}
Check the SupportsFiltering
property to see if the BindingSource
can actually do filtering.
精彩评论