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
1365
copying a subset of rows from a grid and display on seperate grid
posted

hi,

i have an odd request. i have an app with a grid including (2 bands). this app refreshes the grid in the background and i want to take a subset of the rows from th grid and display them on another grid. hopefully including formatting from original grid.

i've tried a couple of different things with LINQ but not getting the desired result.

//first trying to get detail rows, 2nd band (band=1)

 var allRows = from r in ultraGridWatch.Rows.Where (f=>f.Band.Index==1) select r;

//then from those, literally filter on ultragridrows for cells with a specific value.
            var unpriceRows= from r in allRows
                                 where r.Cells["LAST"].Value.ToString().Trim() == ""
                                  select r;

i do believe the first query works because when i run the 2nd query it doesn't complain about "LAST" column. (whereas, just querying the first band threw an exception for that column )

ideally i just want unpriceRows to be a formatted list of the rows i filtered. Then i can copy them and display in a seperate grid.

anyone have any idea on how to achieve this?

thanks in advance

Al