0

enter image description here

In a picture above, you can see how the existing component looks like. The issue i've got is next. By clicking on search button, the api is called and data is fetched and refreshed. i want to call that same function by selecting the drop down option. The problem is, search button component is reusable component in a child component and it holds the method for getting the data. Is there any way i can call that function from parent somehow? This is the Table where the data is set, and also where i define and create component.

 <PagableGridView Application="@Application"
                    TModel="model"
                    Results="@res"
                    IsLoading="@_isload"
                    OnDataLoad="loaddata"
                    EnablePaging="true"
                    EnableSorting="true"
                    EnableFilters="false">

Inside of this component, in a razor.cs File, by clicking this function, the data is loaded in tables.

 private void OnSearchButtonClick()
    {
        Results.Info.CurrentPage = 0;
        Grid.Reload();
    }

Is there anyway i can call this OnSearchButtonClick() from parent component? Sorry if i missed something, i can provide more code and info if needed

0 Answers0