Is there way to copy a grid to another grid without it being a pointer to its originator?
Example:
UltraGrid tmpGrid = SourceGrid;
Using this snippet in my code makes tmpGrid a pointer to the SourceGrid, however what I want to do is simply assign all the data and column settings( group-by, filters, and etc), essentially assign every aspect of the SourceGrid to the tmpGrid without it being a pointer. Is this possible? Sorry if this sounds like a stupid question, but I had to ask.
If the grid has a Clone method, you could try that. But I suspect it does not.
What you can do is create a new grid, set the DataSource and DataMember, then save the DisplayLayout on the original grid and load it into the new grid. That should cover almost everything. You might have to copy some other root-level properties of the grid.
Hello Mike,
The grid does not have a clone method like you said. So I went ahead and tried setting the DataSource and DataMember of the new grid to the source grid's DataSource and DataMember as you suggested. I believe these are the two items I need to set in order to get the data from the source grid into the new grid, however it is not working for me.
Is there way to programmatically copy the rows from the source grid to the new grid?