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
415
Getting row cells array in same order they are displayed
posted

I am trying to create a copy paste feature on the grid, so when the user presses ctrl + C I loop through all the visible cells of the currently selected row and add them to the clipboard. Problem is using:

foreach( UltraGridCell cell in gQuoteDetail.Rows[ Position ].Cells) {

does not return the cells in the order they currently displayed. I also tried:

 foreach( UltraGridCell cell in gQuoteDetail.DisplayLayout.Rows[ Position ].Cells) {

but it seems to return them in the same order. How could I get the cells in order?

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    The band has a method for GetFirstVisibleColumn. So once you have the column, you can use it as the index into the cells collection.

    After the first column, you can use GetRelatedVisibleColumn on the column to get the next column and so on until you get null, which means there are no more columns.

    Also, are you aware of the AllowMultiCellOperation on the Override? This property allows you to enable the grid's built-in cut, copy, paste, and delete features.

Children
No Data