Saturday, February 20, 2010

How To Highlight Selected Field on Detailview in XAF

public partial class LayOutViewController : ViewController
{
public LayOutViewController()
{
InitializeComponent();
RegisterActions(components);
TargetViewType = ViewType.DetailView;
}
protected override void OnActivated()
{
base.OnActivated();
((WinLayoutManager)((View as DetailView).LayoutManager)).ItemCreated += new EventHandler(LayOutViewController_ItemCreated);
}

void LayOutViewController_ItemCreated(object sender, ItemCreatedEventArgs e)
{
DetailView lDet = View as DetailView;
((LayoutControl)(((WinLayoutManager)(lDet.LayoutManager)).Container)).OptionsView.HighlightFocusedItem = true;
((LayoutControl)(((WinLayoutManager)(lDet.LayoutManager)).Container)).Appearance.ControlFocused.BackColor = Color.FromArgb(255, 201, 84);
if (e.Item is LayoutControlGroup)
{
LayoutControlGroup IG = (LayoutControlGroup)e.Item;
if (((IG.TextLocation == Locations.Default) ||
IG.TextLocation == DevExpress.Utils.Locations.Top)
&& !(IG.Parent != null))
IG.ExpandButtonVisible = true;
}
}
}

No comments:

Post a Comment

Mat Table Angular

Mat Table in Angular Mat table is used to display data . its a material designed styled data-table . For using Material Table MatTableMo...