Gets or sets a value indicating whether this
Cell is focused.
Namespace: Dapfor.Net.UiAssembly: Dapfor.Net (in Dapfor.Net.dll) Version: 2.10.3.24917 (2.10.3.24917)
Syntax
C# |
---|
public bool Focused { get; set; } |
Visual Basic |
---|
Public Property Focused As Boolean
Get
Set |
Visual C++ |
---|
public:
property bool Focused {
bool get ();
void set (bool value);
} |
F# |
---|
member Focused : bool with get, set
|
Property Value
Type:
Booleantrue if focused; otherwise,
false.
Remarks
Examples
| Copy |
---|
public void FocusedCellExample(Grid grid)
{
Header header = new Header();
header.Add(new Column("Name"));
header.Add(new Column("Price"));
header.Add(new Column("Quantity"));
grid.Headers.Add(header);
grid.FocusSettings.Mode = FocusMode.Cell;
grid.Rows.Add(new Product());
grid.Rows.Add(new Product());
grid.Rows[0]["Price"].Focused = true;
Console.WriteLine("Focused row = {0}", grid.FocusedRow.VisibleChildIndex);
Console.WriteLine("Focused column = {0}", grid.Headers[0].FocusedColumn.Id);
grid.Headers[0]["Quantity"].Focused = true;
Console.WriteLine("The cell[0, 'Quantity'] is {0}", grid.Rows[0]["Quantity"].Focused ? "focused" : "not focused");
}
Focused row = 0
Focused column = Price
The cell[0, 'Quantity'] is focused |
See Also