如何在CustomEvents事件中获取焦点?
金蝶云社区-云社区用户9R301234
云社区用户9R301234
0人赞赏了该文章 1,670次浏览 未经作者许可,禁止转载编辑于2015年11月02日 18:50:11

背景:动态表单插件,在BeforeBindData事件中获取焦点是有效的,但是到了CustomEvents事件,获取焦点就无效了
请大神帮忙分析分析
部分源代码:
public override void CustomEvents(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.CustomEventsArgs e)
{
base.CustomEvents(e);
if (e.Key.Equals("F_LQ_FILTER") && e.EventName.Equals("EnterKeyPressed"))
{
String Imports = this.View.Model.DataObject["F_LQ_Filter"].ToString();
Imports = CommonMethod.DefaultPlateNum (Imports,this.Context);
String sqlstr;
string message ="";
string Carstr = "";
bool isYF = false;
VehicleFee[] VehicleRce;
List ErrMessage = new List();
DynamicObjectCollection dyCollection;
if (Regex.IsMatch(Imports, CommonMethod.RegexPlateNum) || Regex.IsMatch(Imports, CommonMethod.RegexPlateNum1) || Regex.IsMatch(Imports, CommonMethod.RegexPlateNum2))
{
sqlstr = string.Format("***", Imports);
dyCollection = Kingdee.BOS.App.Data.DBUtils.ExecuteDynamicObject(this.Context, sqlstr);
if (dyCollection.Count == 0)
{
this.View.ShowMessage("没有此车辆");
this.View.GetControl("F_LQ_Filter").SetFocus();
return;
}

     }
    }
   }