当前位置:编程学习 > C#/ASP.NET >>

请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)那段。 不要用工具转换的,因为我也用过此类工具,错误太多! 非常感谢!
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,