/// <summary> /// ���DataGrid��ComboBox�ı༭��ʽ /// </summary> /// <param name="dsName"></param> /// <param name="nvName"></param> /// <param name="filter"></param> /// <returns></returns> public static MyComboBoxEditor GetGridComboEditor(string dsName, string nvName, string filter) { string newNvName = NameValueMappingCollection.Instance.GetDataSourceName(dsName, nvName, filter); MyComboBoxEditor editor = new MyComboBoxEditor(newNvName); ControlDataLoad.InitDataControl((editor.TemplateControl as INameValueMappingBindingControl), dsName, nvName, nvName, filter); return editor; }
/// <summary> /// ���DataGrid��ComboBox�ı༭��ʽ /// </summary> /// <param name="type"></param> /// <param name="notUseEnum"></param> /// <param name="filter"></param> /// <returns></returns> public static MyComboBoxEditor GetGridComboEditor(Type type, bool notUseEnum, string filter) { string typeNvName = NameValueMappingCollection.Instance.Add(type, notUseEnum); string newNvName = NameValueMappingCollection.Instance.GetDataSourceName(null, typeNvName, string.Empty); MyComboBoxEditor editor = new MyComboBoxEditor(newNvName); ControlDataLoad.InitDataControl(editor.TemplateControl as INameValueMappingBindingControl, type, notUseEnum, filter); return editor; }