Hi what I want to do is after hte user has dragged a column into a new position in the grid is rewrite my datatable with the new positions of the columns and then their corresponding rows. I know that sounds simple enough but having trouble finding the answer.
Any help appreciated. Thanks.
Basically I got the excel part. I just need to copy the rows and columns
as shown after the drag to a new datatable,
copy that datatable to the table the grid is bound to and
reapply any existing filters prior to the column drag.
I am sorry for this hassle.
Well, I'm not sure exactly what you are asking. Building the DataTable to export to Excel is really not my area of expertise. But if you are simply asking how you can get the grid columns in order, there are a couple of ways you can do that.
The easiest would be to use grid.ActiveColScrollRegion.VisibleHeaders.
Another way would be to use the GetFirstVisibleColumn method on the band, then use GetRelatedVisibleColumn on each column to loop.
so is there no answer to this? :(
Why can't you use infragistics export to excel? It handles just anything you could ever want to do? When it come to filters use the filtered in logic to determin what rows to export. You could export the filtered in rows to CSV and that will load into excel just fine.