Setting accordion programmatically

Hi. I put a Radzen tree in my sidebar component. When I click on a Document navigates to another component that displays info about the Document in different blocks. Each block is inside a Radzen accordion. What I want is, if the block has info, set its accordion selected true. If the block is empty, sit its accordion selected false.
When click on Doc1 it works as expected but when click on any other Doc all accordions "remember" its previous selected state and my dynamic setting just doesn't work. When debbuging it sets expected values.
Even if I hardcode Selected=true, if last document was collapsed, next document will be collapsed.
Thanks.

@page "/documentdetails/{id:int}"
...
 <RadzenAccordion Multiple="true">
        <Items>
            <RadzenAccordionItem Text=@localizer["dockeywordaccordionheader"] Icon="files" Selected=@bKeyword Style=@sStyleKeyword>
                <table class="table">
                    <tbody>
                        @foreach (var docKeyword in documentKeywords)
                        {
                            <tr>
                                <td><b>@docKeyword.Keyword</b></td>

                            </tr>
                        }
                    </tbody>
                </table>
            </RadzenAccordionItem>
        </Items>
    </RadzenAccordion>
@code {
protected override async Task OnParametersSetAsync()
    {
        try
        {           
            documentKeywords = await DocumentKeywordService.GetDocumentKeywords(id);
         
             if (documentKeywords.Count() > 0)
             {
               sStyleKeyword = sStyleAccordeonFull; }
               bKeyword = true;
             else
             {
               sStyleKeyword = sStyleAccordeonEmpty; }
                bKeyword = false;
             }

        catch (Exception ex)
        {
            error = ex.Message;
        }
    }
}

Here's a pic of the site for a better understanding.

The same behavior when I want to dynamically set its style (background color).

I'm not sure why you're using multiple accordions instead of multiple items in a single accordion - turning multiselect off will have no effect this way. And, you're only showing your code for one of the accordions, so it's difficult to see what's going on.

I manipulate the selected state of accordion items by creating a List of bools, and then set each item's selected property to use one. For example ${vlist[1]} for item1, etc.

SloSuenos

Finally found a workaround. Thanks for your answers.

Hello, What was your workaround?