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

TypeHead on change refresh DataGrid? #96

Open
PhotoSonic opened this issue Jul 2, 2021 · 0 comments
Open

TypeHead on change refresh DataGrid? #96

PhotoSonic opened this issue Jul 2, 2021 · 0 comments

Comments

@PhotoSonic
Copy link

I have page with following

        protected override async Task OnInitializedAsync()
        {
            accessPoints = await GetAccessPoints();
            SelectedAccessPoints = accessPoints.ToList();
            visits = await GetVisitsByAccessPoints(SelectedAccessPoints);
        }

accessPoints is data for my typehead

                            <Typeahead SearchMethod="@SearchAccessPoints"
                                       Items="accessPoints"
                                       @bind-Values="@SelectedAccessPoints"
                                       Placeholder="Access point">
                                <SelectedTemplate Context="accessPoint">
                                    @accessPoint.Name
                                </SelectedTemplate>
                                <ResultTemplate Context="accessPoint">
                                    @accessPoint.Name
                                </ResultTemplate>
                            </Typeahead>

visits are my data for my datagrid.

<DataGrid Data="visits" class="table table-hover" @ref="Grid">

Can you pls tell me how to call onchage event on typehead and then call method for refreshing the grid with new visit data ( await GetVisitsByAccessPoints(SelectedAccessPoints);) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant