I have to right-align several columns thru code-behind in vb. How can I specify which columns to align and how can I do this? I have been using the fieldlayout settings class, but I think I am missing something.
Thanks
I have similar code in C# but to center a column value (in code-behind). For a right-alignement I think I could just change the HorizonalAlignment to .Right instead of .Center. Here is a snippet of the code I'm using:
In event for FieldLayoutInitialized -
...
Style centerColumnStyle = new Style(typeof(CellValuePresenter));
centerColumnStyle.Setters.Add(new Setter(CellValuePresenter.HorizontalAlignmentProperty, HorizontalAlignment.Center));
Field
someColumn = new Field();
someColumn.Settings.CellValuePresenterStyle = centerColumnStyle;
e.FieldLayout.Fields.Add(someColumn);
Not sure on the VB equivalent but maybe you can convert this readily enough?