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
140
How to specify the column position in the grid to be different from the actual position in the bindingdata?
posted

Hi,

I have recently started using the infragistics UltraWinGrid. I have a situation as described below.

i have a combobox that specifies what query has to be executed wheneever a user changes the item. the result has to be displayed in the ultrawingrid. The no of columns in the datatable varies based on the selection made in the combobox . for some of the queries i need to display the columns in a perticular order. for eg: if the datatable has col1,col2 and col3 in the order. I have to display this in the ultrawingrid in the order col2,col1 and then col3.

How do i do this at runtime? which property of the grid will allow me to display the column in the order i want? i cannot change the query.

please help.

Thanks & Regards

Casey

Parents
No Data
Reply
  • 155
    Verified Answer
    posted

    you set the Header.VisiblePosition property (starts at zero) 

     UltraGridColumn col;

    col = TransportationGrid.Grid.Rows.Band.Columns["MovementLoadId"];
    col.Header.VisiblePosition = 0;
    col.Width = 100;

    col = TransportationGrid.Grid.Rows.Band.Columns["MovementTime"];
    col.Header.VisiblePosition = 1;
    col.Width = 75;

    and so on...

     

Children
No Data