BlazorWebFormsComponents icon indicating copy to clipboard operation
BlazorWebFormsComponents copied to clipboard

Pass through ItemTypes to childcomponents

Open csharpfritz opened this issue 5 years ago • 3 comments

Example: For a GridView, need to pass the ItemType of the Grid through to the column child components so that we don't have to repeat the ItemType on each of the child components

csharpfritz avatar Apr 14 '20 12:04 csharpfritz

DEVNOTES

I've tried to think a little differently about this, and compared ListView and GridView

ListView GridView
Asp.Net 3.5. Asp.Net 2.0.
Template driven. Rendered as Table.
Built-in supports for Data grouping. Need to write custom code.
Built-in supports for Insert operation. Need to write custom code.
Provides flexible layout to your data. Need to write custom code.
Performance is fast is compared to GridView. Performance is slow as compared to ListView.

Which implies that a GridView is really a ListView short a few useful features. Read as : Specialisation of a ListView where we specialize down.

Even though an AspNet gridView and listView might have an intersect, but one isn't wholly a subclass of the other, we do not need that to be the case for BlazorWebComponents.

Remembering the objective that we should be able to paste the markup into our page, and the page should render. It doesn't really matter if there are extra features available for the GridView that weren't avaiable in webforms, but any extra GridView properties still need to be added.

Reviewing our current implementation, we see that the output is much the same: a table with head, body, tr and td.

committed this as an example if anyone wants to review and ponder. First test is working : src/BlazorWebFormsComponents.Test/GridView/AutogenerateColumns.razor nothing else works yet.. but I think this is an interesting POC and might be a useful approach for other components.

grleachman avatar Apr 17 '20 01:04 grleachman

I like the general idea of implementing the GridView through the ListView. Users should not see a difference on the surface.

egil avatar Apr 17 '20 07:04 egil

Very interesting approach... I like the simplicity of the approach and re-use of other components we've already completed

Jeff

On Fri, Apr 17, 2020 at 3:45 AM Egil Hansen [email protected] wrote:

I like the general idea of implementing the GridView through the ListView. Users should not see a difference on the surface.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/FritzAndFriends/BlazorWebFormsComponents/issues/163#issuecomment-615097200, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAATF4PFCAHELMMHXTXJNF3RNACK7ANCNFSM4MHWZITA .

csharpfritz avatar Apr 17 '20 13:04 csharpfritz