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
70
UltraGridRow from DataRow
posted

Hello.

I am programming against several methods that take as parameters UltraWinGrids and UltraGridRows.

I need to select a certain number of rows from a first UltraWinGrid and copy them into a second UltraWinGrid, to pass the second as a parameter into the method.

Currently I am casting the Grid1.DataSource as DataSet1, performing my selection logic on DataSet1, then creating a new DataSet2 with the elements of DataSet1 that passed the selection routines.  At this point, new Grid2 is created, and the DisplayLayout of Grid1 is copied into Grid2.  I then bind Grid2 to DataSet2.

The problem I have is that even though the Grid2.DataSource is pointing to my DataSet2 and filled with data, the Grid2.Rows collection is empty.

The existing method takes an UltraWinGrid in and picks off the UltraGridRows.  As you can imagine, I cannot change the existing code.

How can I make this work?