Hi Nick,
Everything you have here sounds not only doable, but pretty easy. All you would have to do is set the DataSource on the grid and it will automatically pick up the structure of the data source you assigned. You could use the Load and Save methods on the grid's DisplayLayout to save the last layout for each different view, so that when the user switches away from a view and back, the grid would maintain the column sizing, position, sorting, etc. that they had the last time they viewed it.
Regarding the hiding of columns, you can use the ColumnChooser for this. The easiest way to do this is touse the RowSelectorHeaderStyle property and set it up as a ColumnChooser button. Then the users can click it and it brings up a list of the column that they can show / hide just like Microsoft Outlook has.
MIke -
Thanks, this helps greatly, the main purpose of the form is to allow the user to export to the clip board the data in the grid.
I do have another question. Let's say I apply all suggestion and the user filters the data using columns filters and hides a couple of columns in the process. What the best way to copy to the clip board only the rows and columns currect displayed in the grid? Again many thanks. BTW, we are using v 3.1 of the UltraGrid control.
Nick
Wow, v3.1 is pretty old. I'm not sure what kind of funtionality might not have been available in that version.
You would have to loop through the rows. In the current version, you could use the Rows.GetFilteredInNonGroupByRow method to get the rows, But in v3.1, you probably have to loop through every row and check the HiddenResolved property. As for the columns, you should be able to use GetFirstVisibleColumn on the Band and then use GetRelatedVisibleColumn to get the next column until you hit the end.
Nick -
I agree, manegemnt does not wan to upgrade at the moment, typical right? So I'm stuck with v3.1 for now, I'm wondering if any of the functionality I need in my initial post is doable in v3.1.
Thanks,
Nick A.
Hello Nick,
Gosh you are missing out on so many great features added since 3.1. Might be worthwhile to download a trial version and see what all has been added. I started using the product just a little before that version and I can't imagine not having all the neat capabilities since then. There is an example in the samples explorer for the grid of being able to copy a rectangle of cells and paste into Excel. This ability was added I believe around the 5.3 or slightly after timeframe.
Nick S.