RadZenTabs

I have a declaration for RadZen tabs, and within the element I perform a foreach on my generic list adding each radzentabsitem. Later, I add a new item in the list, and I re-order the list so it will show up in the correct tab location. However, even though my list of items is in the proper order (triple checked)), the newly added tabs are always rendered at the very end/far right. Any ideas? I am using 2.10.3.

Thanks.

Can you post some code? We are not sure what add new item to the list, reorder means in this context.

Sure! This was just a POC, so the code isnt the best but we were trying different approaches.

@foreach (Compliance_Form_Upload_Service.Data.TabForms thisTabForm in tabForms) {
        if (thisTabForm.formType == "NewForm")
        {
            <RadzenTabsItem @key="thisTabForm.formName" Text="@thisTabForm.formName" Style="background-color:lightblue;">
                <ChildContent>
                    <RadzenLabel Text="Add another Form?"></RadzenLabel>
                    <RadzenButton Click='@((args) => addFormClick(args, thisTabForm.formName))' Text="+"></RadzenButton>
                </ChildContent>
            </RadzenTabsItem>

        }
        else
        {
            <RadzenTabsItem @key="thisTabForm.formName" Text="@thisTabForm.formName" Style="background-color:pink;">
                <ChildContent>
                    <RadzenLabel Text="Expire another Form?"></RadzenLabel>
                    <RadzenButton Click='@((args) => addExpireFormClick(args, thisTabForm.formName))' Text="+"></RadzenButton>
                </ChildContent>
            </RadzenTabsItem>

        }
    }
</Tabs>

Then in our initialize:

    newForms.Add(new Compliance_Form_Upload_Service.Data.TabForms { formType = "NewForm", formName = "New Form #1" });
    expireForms.Add(new Compliance_Form_Upload_Service.Data.TabForms { formType = "ExpireForm", formName = "Expiring Form #1" });
    newForms.Add(new Compliance_Form_Upload_Service.Data.TabForms { formType = "NewForm", formName = "New Form #2" });
    expireForms.Add(new Compliance_Form_Upload_Service.Data.TabForms { formType = "ExpireForm", formName = "Expiring Form #2" });
    newForms.Add(new Compliance_Form_Upload_Service.Data.TabForms { formType = "NewForm", formName = "New Form #3" });
    expireForms.Add(new Compliance_Form_Upload_Service.Data.TabForms { formType = "ExpireForm", formName = "Expiring Form #3" });

    tabForms.AddRange(newForms);
    tabForms.AddRange(expireForms);

Then later, when we click a button:
void addFormClick(MouseEventArgs args, string formName)
{
List<Compliance_Form_Upload_Service.Data.TabForms> thisList = tabForms.Where(s => s.formName == formName).ToList();

    if (thisList.Count > 0)
    {
        addFormNumber++;

        newForms.Add(new Compliance_Form_Upload_Service.Data.TabForms { formType = "NewForm", formName = "New Form #" + addFormNumber.ToString() });

        tabForms.Clear();
        tabForms.AddRange(newForms);
        tabForms.AddRange(expireForms);


    }

    StateHasChanged();
}