请C#大侠帮忙翻译这段代码为VB.Net的,谢谢了!
void gridLookUpEdit1_Popup(object sender, EventArgs e)
{
FilterLookup(sender);
}
private void FilterLookup(object sender) {
Text += " ! ";
GridLookUpEdit edit = sender as GridLookUpEdit;
GridView gridView = edit.Properties.View as GridView;
FieldInfo fi = gridView.GetType().GetField("extraFilter", BindingFlags.NonPublic | BindingFlags.Instance);
Text = edit.AutoSearchText;
BinaryOperator op1 = new BinaryOperator("Code", edit.AutoSearchText + "%", BinaryOperatorType.Like);
BinaryOperator op2 = new BinaryOperator("Name", edit.AutoSearchText + "%", BinaryOperatorType.Like);
string filterCondition = new GroupOperator(GroupOperatorType.Or, new CriteriaOperator[] { op1, op2 }).ToString();
fi.SetValue(gridView, filterCondition);
MethodInfo mi = gridView.GetType().GetMethod("ApplyColumnsFilterEx", BindingFlags.NonPublic | BindingFlags.Instance);
mi.Invoke(gridView, null);
}
private void gridLookUpEdit1_EditValueChanging(object sender, ChangingEventArgs e) {
this.BeginInvoke(new System.Windows.Forms.MethodInvoker(delegate{
FilterLookup(sender);
}));
}
--------------------------------------------------------------------------------------------------
请C#大侠帮小弟将上述代码翻译成VB.Net的,谢谢了!
最主要是下面(private void gridLookUpEdit1_EditValueChanging)那段。
不要用工具转换的,因为我也用过此类工具,错误太多!
非常感谢!
其他:This is because our products can not be temporarily packaging (missing labels), the warehouse is also available in sets of 2525, can defer the delivery date follow-up »
上一个:VB.NET windows from 应用程序窗体之间是用什么方式传递值过去
下一个:求一本VB.net的书