Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
Adding unbound columns at runtime
posted
Hi, I'm trying to add a column in all bands of my grid, where I could place an icon of the row Status (validation issues)... I've set this code at OnInitializeLayout for each band in Me.DisplayLayout.Bands col = band.Columns.Add("colError",String.Empty) col.Width = 20 col.Hidden = False col.DataType = GetType(System.Drawing.Bitmap) col.Header.VisiblePosition = 0 next This works for all the bands where I'm not using "UseRowLayout".... in those columns (with UseRowLayout = true) the new column doesn't appear, though I'm sure its created in the init event (I traced it and it's there when init finishes) Is there anything special I must do to make that column appear in bands with UseRowLayout = true ?? Thanks in advance
  • 37774
    posted

    You might need to play around with setting the column's RowLayoutColumnInfo.OriginX to appear after the highest OriginX of the other columns; if you want it to appear earlier, you need to set its OriginX and then shift over the other columns.  Naturally this would be a lot easier at design-time since you could then use the designer to manipulate your layout and position your unbound column.

    -Matt