Edit in place settings.
Namespace: Dapfor.Net.UiAssembly: Dapfor.Net (in Dapfor.Net.dll) Version: 2.10.3.24917 (2.10.3.24917)
Syntax
C# |
---|
[TypeConverterAttribute("Dapfor.Net.Design.ExpandableConverter,Dapfor.Net.Design,Version=2.10.3.24917,Culture=neutral,PublicKeyToken=4427dced42249680")]
public sealed class GridEditInPlace |
Visual Basic |
---|
<TypeConverterAttribute("Dapfor.Net.Design.ExpandableConverter,Dapfor.Net.Design,Version=2.10.3.24917,Culture=neutral,PublicKeyToken=4427dced42249680")>
Public NotInheritable Class GridEditInPlace |
Visual C++ |
---|
[TypeConverterAttribute(L"Dapfor.Net.Design.ExpandableConverter,Dapfor.Net.Design,Version=2.10.3.24917,Culture=neutral,PublicKeyToken=4427dced42249680")]
public ref class GridEditInPlace sealed |
F# |
---|
[<SealedAttribute>]
[<TypeConverterAttribute("Dapfor.Net.Design.ExpandableConverter,Dapfor.Net.Design,Version=2.10.3.24917,Culture=neutral,PublicKeyToken=4427dced42249680")>]
type GridEditInPlace = class end |
Remarks
Examples
| Copy |
---|
public class CustomEditor : UITypeEditor
{
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
{
IWindowsFormsEditorService service = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
object result = value;
Button button = new Button();
button.Click += delegate
{
service.CloseDropDown();
};
service.DropDownControl(button);
return result;
}
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
{
return UITypeEditorEditStyle.DropDown;
}
}
public class Car
{
private double price;
private double maxSpeed;
private Color color;
[Editor(typeof(CustomEditor), typeof(UITypeEditor))]
public double MaxSpeed
{
get { return maxSpeed; }
set { maxSpeed = value; }
}
public double Price
{
get { return price; }
set { price = value; }
}
public Color Color
{
get { return color; }
set { color = value; }
}
}
public void AddDataObjectToGrid(Grid grid)
{
grid.Headers.Add(new Header());
grid.Headers[0].Add(new Column("MaxSpeed"));
grid.Headers[0].Add(new Column("Price"));
grid.Headers[0].Add(new Column("Color"));
grid.Headers[0]["MaxSpeed"].Editable = true;
grid.Headers[0]["Price"].Editable = true;
grid.Headers[0]["Price"].Editor = new CustomEditor();
grid.Headers[0]["Color"].Editable = true;
grid.Rows.Add(new Car());
grid.Rows[0]["Price"].Edit();
} |
Inheritance Hierarchy
Thread Safety
The class is not thread safe.
See Also