(1.5x) Drag and Drop with CSLA

(1.5x) Drag and Drop with CSLA

Old forum URL: forums.lhotka.net/forums/t/64.aspx


esteban404 posted on Wednesday, May 10, 2006

I have a collection of preferred ResourceIDs for each user. This collection is bound to a grid (and the awesome DevExpress LookupEdit!). I have another grid which needs to display the available leftovers.

Do I need to create an object for both? I lazy load the one, so both won't be a huge teaser in the Fetch.

I couldn't prove that simplified D&D operations. *Something* needs to help synchronize and I've only trialed it with list boxes. Grids are failing and I think this is behind it.

_E

RockfordLhotka replied on Wednesday, May 10, 2006

I'm not sure I understand, but I think you have a list, A, of items. Then there's a subset of A that is associated with the user (Au) and of course another subset that is not associated with the user (A')?

You bind Au to a grid for display, and want to have a display for A'?

Certainly you could have two lists for this purpose, but I wonder if you aren't better off having one list (A) and then two views (Au and A'). These views would, in fact, be different objects - but they'd merely be filters against the actual A. So the only thing you'd get from the database would be A - and of course the identifiers (key values) needed to filter to create Au.

Just a thought anyway.

esteban404 replied on Thursday, May 11, 2006

Thanks, Rockford. That's kind of what I did. This is primarily for the Designers themselves. Loading their own work was not enough, loading everyones was too much.

I ended up creating a single object (Au), bound it to a grid and away it went. I saw you know DevExpress, so I use a repository lookup edit in the grid to which I bind Au. That leaves all of the Designers available in the list, and the collection prevents duplicates. I just lazy load it and let the user take care of knowing what they want. Hope that's not a mistake. ;-]

_E

Copyright (c) Marimer LLC