I am able to get the visible rows in the grid, but how do I get the visible columns? I am only interested in the columns that are visible in the active scroll region, not anthing that is out of view.
Hello,
There is some code at the following location in our documentation that prints out all of the visible columns whenever the grid is scrolled horizontally. It should help you do what you want.
http://help.infragistics.com/NetAdvantage/WinForms/2010.3/CLR2.0/?page=Infragistics2.Win.UltraWinGrid.v10.3~Infragistics.Win.UltraWinGrid.VisibleHeader.html
I tried using your suggestion. The VisibleHeaders seem to be GroupHeaders. From that I have to get all the columns in the group and loop through them, checking the GetUIElement on each of them as I loop. This works, but it seems like there should be a more efficient way to get the visible columns. Am I missing something?
You can get that list through the property called ActiveColScrollRegion. Here's a quick snippet showing it in action.
ColScrollRegion csr = this.ultraGrid1.ActiveColScrollRegion; foreach (VisibleHeader vh in csr.VisibleHeaders) { MessageBox.Show(vh.Header.Caption); }