如何处理SearchLookUpEdit中的FindClick事
作者:
屋顶上的橡皮人 | 来源:发表于
2016-08-31 10:12 被阅读587次void searchLookUpEdit1_Popup(object sender, EventArgs e) {
IPopupControl popupControl = sender as IPopupControl;
LayoutControl layoutControl = popupControl.PopupWindow.Controls[2].Controls[0] as LayoutControl;
SimpleButton Button = ((LayoutControlItem)layoutControl.Items.FindByName("lciButtonFind")).Control as SimpleButton;
if (Button != null)
{ Button.Click -= new EventHandler(button_Click);
Button.Click += new EventHandler(button_Click);
}
}
void button_Click(object sender, EventArgs e)
{ //your code
}
void searchLookUpEdit1_QueryCloseUp(object sender, System.ComponentModel.CancelEventArgs e)
{
IPopupControl popupControl = sender as IPopupControl;
LayoutControl layoutControl = popupControl.PopupWindow.Controls[2].Controls[0] as LayoutControl;
SimpleButton Button = ((LayoutControlItem)layoutControl.Items.FindByName("lciButtonFind")).Control as SimpleButton;
if (Button != null)
{
Button.Click -= new EventHandler(button_Click);
}
}
还有一种写法
Paste_Image.png
本文标题:如何处理SearchLookUpEdit中的FindClick事
本文链接:https://www.haomeiwen.com/subject/ltpqettx.html
网友评论