protected internal virtual void RaiseConvertEditValueToCheckState(ConvertEditValueToCheckStateEventArgs e) { ConvertEditValueToCheckStateEventHandler handler = (ConvertEditValueToCheckStateEventHandler)Events[_convertEditValueToCheckState]; if (handler != null) { handler(GetEventSender(), e); } }
void Properties_ConvertEditValueToCheckState(object sender, ConvertEditValueToCheckStateEventArgs e) { for (int i = 0; i < e.EditValue.Length; i++) { if (e.EditValue[i] == '1') { e.CheckedState[i] = true; } } }
protected override void PreQueryDisplayText(QueryDisplayTextEventArgs e) { if (CanRaiseConvertEditValueToCheckState && e.EditValue != null) { ConvertEditValueToCheckStateEventArgs ea = new ConvertEditValueToCheckStateEventArgs(e.EditValue as string, Items.Count); RaiseConvertEditValueToCheckState(ea); e.DisplayText = makeNormalValue(ea.CheckedState); } base.PreQueryDisplayText(e); }