Clearing/reset DropDawnDataGrid

I have two DropDawnDataGrid, one for Events and one for Boats. Event is loaded OnInitializedAsync().

The Boats DropDawnDataGrid is loaded when DropDownDataGrid0Change i fired and that works

Then the user picks a boat and I will set
protected async System.Threading.Tasks.Task DropDownDataGrid1Change(System.Object args)
{

        SelectedSepId = ((SailtIT.Models.SailItV2DB.ListBoatsInEventNoResultSp)args).Sepid;  
        SelectedStartTime = ((SailtIT.Models.SailItV2DB.ListBoatsInEventNoResultSp)args).StartTime;
        SelectedSegId = ((SailtIT.Models.SailItV2DB.ListBoatsInEventNoResultSp)args).SegId;

The user enters time and the BtSaveResultClick is fired and the record is save in the database
I after then rerun listBoatsInEventNoResultSps = await SailItV2DBService.GetListBoatsInEventNoResultSps(SaeId: SelectedSaeId); to update the Boat DropDownDataGrid but as you can se unte the pic the old boats is still showing

Before SAVE

AFTER SAVE

I would like to have blank, not SWE 11611 - Pisco Sour, this boat is not in the list only SWE 24 is in the list.

So how do I remove the displayed text?

The DropDownDataGrid will display text using a lookup to defined TextProperty from what is set as ValueProperty and @bind-Value. If you believe there is a problem with the component and the text displayed is not related to the bound value feel free to provide an runnable example where this can be reproduced.

Hi

Is there any way to clear the RadzenDropDownGrid? So that it is in the same stat as when it is created.

There is Reset() method however the selection depends on @bind-Value.

Hi
I understand that,

@bind-Value="@SelectedDsiplayString

but when I do that this code fails

I need the Sepid, the Starttime and SegId to save the sailing result.

I'm afraid that I don't understand your case nor can provide additional details to what I've already posted.

Ok, I understand that. My explanation is not clear.

So in what format do you need for the database?

You can send us your app and the database as backup at info@radzen.com. Use sharing services like Google Drive instead attachments. Please provide clear explanations on what's the problem and what's the expected result. Alternatively you can send us small subset of your database as SQL script - make sure it can be used to replicate the problem.

I've revied your app however didn't found any of the approaches I've recommended in this thread. Your DropDownDataGrid Value is not two-way bound in order to set null to a variable to clear the selection nor your are using Reset(). You should also check if args is not null in DropDownDataGrid Change event handler or you will get null reference exception.


Thanks its works, sorry for my stupid questions!