Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
0
Multi column combo box fields out of order
posted

Hello! I am creating an MultiColumnComboBox on a basic blazor component. I'm running into an issue where it seems to be ignoring the order of the fields I've added.  Here is my code:

@page "/contacts"

<PageTitle>Contacts</PageTitle>

<h3>Contacts</h3>
<div class="row">
<div class="col-6">
<label for="cmbEntity">Entity</label>
<IgbMultiColumnComboBox Height="50px" Width="400px"
               DataSource="entities"
               Fields="DisplayFields"
               TextField="Name"
               Placeholder = "Select Entity"
               DefaultColumnWidth="200"
               SortMode="SortMode.SortByMultipleColumnsTriState" />
</div>
</div>


@code {
private List<Entity> entities = new List<Entity>();
protected string[] DisplayFields = new string[] {"Name", "Number", "State"};
protected override void OnInitialized()
{
EntityManager em = new EntityManager();
entities = em.ActiveEntitiesGet("1","0");

}

}

You can see that I have set the "Fields" property to my string array that is ordered as "Name", "Number", "State."  But when the page loads, the columns are displayed as "Number", "State", "Name". How can I get it to display in the correct order? No matter what order I put the DisplayFields string array in, it's always displaying as "Number", "State", and then "Name" and I need Name to be first in the columns. 


Thanks! 

  • 7535
    Offline posted

    Hello Melissa,,

    Yes you are right , I am able to reproduce the behavior you described, I discussed the matter with the developer and find this DisplayFields  string array Fields would not honor the order.

    This would just tells the combo that which fields you want it to include, it does not control the order of the columns.

    Currently expected behavior would be a feature request for us to impalement for future version.
    You can suggest the request at 
    https://github.com/IgniteUI/igniteui-blazor-examples/issues