반응형
어셈블리에서 CustomDrawCell 이벤트가 발생 하고 있고
원천 소스가 없어 이 이벤트를 핸들링 할 수도 없고
그래서 구글링 하다가 이벤트를 없애 버리면 된다는 것을 찾았고
아래가 그 소스임.
핵심은 보라색으로 폰트로 되어 있는 부분으로 타입과 이벤트 이름을 알아야 한다는 것.
즉, CustomDrawCell 이벤트의 type이 GridView 에 있다는 것이 핵심.
그런데 왜 첫글자는 또 소문자야. 아 ...
FieldInfo fi = typeof(GridView).GetField("customDrawCell", BindingFlags.Static | BindingFlags.NonPublic );
object customdrawcell = fi.GetValue ( grd.View );
PropertyInfo pi = typeof(GridView).GetProperty("Events", BindingFlags.Instance | BindingFlags.NonPublic );
EventHandlerList list = (EventHandlerList) pi.GetValue ( grd.View , null);
eventHandler = list[customdrawcell];
list.RemoveHandler (customdrawcell, list[customdrawcell]);
grd.View.RefreshData ();
반응형
광고
광고