Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass through ItemTypes to childcomponents #163

Open
csharpfritz opened this issue Apr 14, 2020 · 3 comments
Open

Pass through ItemTypes to childcomponents #163

csharpfritz opened this issue Apr 14, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@csharpfritz
Copy link
Contributor

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 csharpfritz added the enhancement New feature or request label Apr 14, 2020
grleachman added a commit to grleachman/BlazorWebFormsComponents that referenced this issue Apr 17, 2020
@grleachman
Copy link
Collaborator

grleachman commented Apr 17, 2020

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.

@egil
Copy link
Collaborator

egil commented Apr 17, 2020

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

@csharpfritz
Copy link
Contributor Author

csharpfritz commented Apr 17, 2020 via email

grleachman added a commit to grleachman/BlazorWebFormsComponents that referenced this issue Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants