How do you make the CustomAdaptor "Read" multiple times

When using the CustomAdaptor with the combo box, the first time I open the popup, the combo-box will call the ReadAsync function.

But lets say the data base has changed. How do I make the CustomAdaptor call the "ReadAsync" function again, so that the data within the combo box is updated with the latest information?

Thanks

6 Replies 1 reply marked as answer

SN Sevvandhi Nagulan Syncfusion Team October 20, 2020 09:50 AM UTC

Hi Jeremy,   


Greetings from Syncfusion support.  


We would like to inform you that, we don’t have inbuilt support to make the request again to ReadAsync function manually. We have considered this as a feature and logged a feature task “Data reloading support in CustomAdaptor” for this requirement. We have planned to implement this and include this feature in any of our upcoming releases.    
    

To make it count, please cast your vote. We will prioritize the features based on the demands of each release. If you have more specifications / suggestions on the request for the feature, you can add it to the portal as a comment.   


You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.    
  
  
 
  
Please get back to us if you need further assistance.   


Regards,  
Sevvandhi N 



PG Pon Geetha A J Syncfusion Team October 21, 2020 04:30 AM UTC

To: Syncfusion Support <[email protected]>
Subject: can you please add this as a reply to thread Blazor forum thread 158864 
for some reason the forum is not allowing the below because "You have tried to enter a word or URL that is not allowed on this site. If you believe that this is inaccurate, please contact us at [email protected]." 
Can you tell me what is being disallowed? 
 
Can you add the below as a reply to the forum please 
 
 
 
Thankyou. 
 
can you please suggest how to implement the following functionality 
I have two combo boxes - VehicleTypes, and VehicleSubtypes (parent child relationship). 
Initially the VehicleTypes combo box is loaded with a list of data (lets say, Primemover, Rigid, Trailer). Because no vehicle type is selected, the VehicleSubtypes combo box is empty. 
When I select a VehicleType, the VehicleSubtypes combo box is updated with a the child list of Primemover Subtypes. 
When I select VehicleType Trailer, the VehicleSubtypes combo box is is updated to only display the list of Trailer subtypes. 
Thanks 



JE Jeremy October 22, 2020 11:17 AM UTC

thanks Sevvandhi


SN Sevvandhi Nagulan Syncfusion Team October 23, 2020 12:11 PM UTC

Hi Jeremy, 


Thanks for the update. 


We prepared the sample the based on the mentioned scenario. Please refer the below code and sample, 


div class="col-lg-12 control-section"> 
    <div class="control-wrapper"> 
        <div class="padding-top"> 
            <SfComboBox TValue="string" TItem="VehicleTypesModel" Placeholder="Select a vehicle" AllowCustom="false" PopupHeight="auto" DataSource="@VehicleTypes"> 
                <ComboBoxEvents TValue="string" TItem="VehicleTypesModel" ValueChange="ChangeVehicle"></ComboBoxEvents> 
                <ComboBoxFieldSettings Text="VehicleName" Value="VehicleId"></ComboBoxFieldSettings> 
            </SfComboBox> 
        </div> 
        <div class="padding-top"> 
            <SfComboBox TValue="string" TItem="VehicleSubtypesModel" Enabled="@EnableStateDropDown" @bind-Value="@SubVehicleValue" Placeholder="Select a sub vehicle" Query="@Query" AllowCustom="false" PopupHeight="auto" DataSource="@VehicleSubtypes"> 
                <ComboBoxFieldSettings Text="VehicleSubName" Value="VehicleSubId"></ComboBoxFieldSettings> 
            </SfComboBox> 
        </div> 
    </div> 
</div> 
 
    public void ChangeVehicle(Syncfusion.Blazor.DropDowns.ChangeEventArgs<string, VehicleTypesModel> args) 
    { 
        this.EnableStateDropDown = true; 
        this.Query = new Query().Where(new WhereFilter() { Field = "VehicleId", Operator = "equal", value = args.Value, IgnoreCase = false, IgnoreAccent = false }); 
        this.SubVehicleValue = null; 
    } 


Please find the sample below, 




Kindly check the above sample and get back to us if you need further assistance. 


Regards, 
Sevvandhi N 


Marked as answer

JE Jeremy November 2, 2020 09:44 AM UTC

Thanks Sevvandhi


sorry for my slow response, I had been working on a solution where the subtype data was being loaded more dynamically from the API / Database upon vehicle change, and hence adjusting the SfComboBox.Datasource (which I was having problems with).

Thanks for the solution below, I like that for when the VehicleSubtypes list is not too big to load from the database (otherwise you would only want pull the appropriate data for the selected vehicle.)

Thanks,
Jeremy


SN Sevvandhi Nagulan Syncfusion Team November 3, 2020 07:11 AM UTC

Hi Jeremy, 


Thanks for the update. 


Please let us know whether or not the sample given will helps you. If not, please explain the issues you face in the application that would be useful for further validation. 


Regards, 
Sevvandhi N 


Loader.
Up arrow icon