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
165
How to add a column in a infragistics Ultrawin grid?
posted

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.

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    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;

Children
No Data