ESRI.ArcGIS.ADF.Web.UI.WebControls
EditValue Method
See Also 
ESRI.ArcGIS.ADF.Web.UI.WebControls.Design Namespace > DropDownListTypeEditor Class : EditValue Method




EditValue must be overridden from UITypeEditor to install a control that appears in the drop down. For UITypeEditorEditStyle.DropDown, here is the general procedure: 1. Get the Edit Service from pProvider.GetService(typeof(IWindowsFormsEditorService)). It contains methods to run the DropDown and Forms interfaces. 2. Get a Window control instance that reflects the UI you want. In this case, its a ListBox. If you wanted multiple controls, consider something like the Panel class and add controls to its Controls list. 3. We want the ListBox to close on a Click event much like boolean and enum dropdowns do. So we set up a Click event handler that calls CloseDropDown on the Edit Service. 4. Add data to the ListBox. 5. Set the initial value of the list. pValue contains that value. 6. Let the Edit Service open and manage the DropDown interface. 7. Return the value from the list.

Overload List

OverloadDescription
EditValue(ITypeDescriptorContext,IServiceProvider,Object) EditValue must be overridden from UITypeEditor to install a control that appears in the drop down. For UITypeEditorEditStyle.DropDown, here is the general procedure: 1. Get the Edit Service from pProvider.GetService(typeof(IWindowsFormsEditorService)). It contains methods to run the DropDown and Forms interfaces. 2. Get a Window control instance that reflects the UI you want. In this case, its a ListBox. If you wanted multiple controls, consider something like the Panel class and add controls to its Controls list. 3. We want the ListBox to close on a Click event much like boolean and enum dropdowns do. So we set up a Click event handler that calls CloseDropDown on the Edit Service. 4. Add data to the ListBox. 5. Set the initial value of the list. pValue contains that value. 6. Let the Edit Service open and manage the DropDown interface. 7. Return the value from the list.  
EditValue(IServiceProvider,Object) (Inherited from System.Drawing.Design.UITypeEditor)

See Also

© 2010 All Rights Reserved.