Hi,
Suppose i have four columns say A,B,C and E. i want to add one more column i.e. D inbetween C and E.
How can i do this? later the newly added column will be populated with a value returned from Business logic program
that is coded in COBOL.
Thank you,
Basavaraj.
Handle the InitializeLayout event of the grid. You can add an unbound column like so:
e.Layout.Bands[0].Columns.Add("D");
To control the positions of the columns, you use the column.Header.VisiblePosition. So you would do something like this:
e.Layout.Bands[0].Columns["A"].Header.VisiblePosition = 0;
e.Layout.Bands[0].Columns["B"].Header.VisiblePosition = 1;
e.Layout.Bands[0].Columns["C"].Header.VisiblePosition = 2;
e.Layout.Bands[0].Columns["D"].Header.VisiblePosition = 3;
e.Layout.Bands[0].Columns["E"].Header.VisiblePosition = 4;