I have a ultrawingrid with dock.fill property set. Also the scrollbars are turned off. The grid is in cardview and rowlayout is turned on. I have many columns and only 1 row i.e only 1 card. I want to show the columns in different rows. The datasource is set to a table at run time.
Now they are arranged as
| Column1 | text | Column2 | text | Column3 | text | Column4 | text | Column5 | text |
and a scrollbar appears if they move beyond the right boundary. Instead I want it to show only 3 columns in first row then the next 3 in next row and so on. No scrollbars.
Hello Puneet,
You could hook to the 'AfterColPosChanged' event and check if "e.PosChanged == PosChanged.HiddenStateChanged".
Thanks Boris for the reply. But the sample does not suit my scenario. I have a datatable in which the number of columns are not predetermined. So I can not design it in the designer. I have been able to apply the multiple row format by using a rowlayout object and assigning the columns at specific locations in it during the loading of the grid using the following code inside a loop:
rowLayout2.ColumnInfos("columnname").Initialize(i*2, j*2, 2, 2)
here i,j represent the rows and columns respectively which have been calculated earlier depending on the total number of columns.
So now I have a different problem which is if someone removes some columns from the column chooser button then is there an event handler of type eg. after columns change so that I can refresh the grid to rearrange the columns position. Also If the grid can automatically handle such functionality using the width visible then that would be great.
Regards
Puneet
Could you please review the sample attached to this post and see if it meets your requirements. Please feel free to let me know if I misunderstood you or if you have any other questions.