Setting Reference Object using GridMultiColumnDropDownList

I have a SfDatagrid that is bound to an collection of objects.  The object has a property that is a reference to another object.  I want to use a GridMultiColumnDropDownList to show all of the available objects and have the selection of the GridMultiColumnDropDownList set the reference property to be that reference object.

If the reference is null I can get the GridMultiColumnDropDownList to set the reference, but if there is an existing reference it will not update the property to the selected object reference.

    public class ReferenceOwningClass
    {
        public int Id { get; set; }

        public ReferencedClass Referenced { get; set; }
    }

    public class ReferencedClass
    {
        public int Id { get; set; }

        public string Name { get; set; }
    }


My Xaml looks something like this:

<syncfusion:GridMultiColumnDropDownList


                                DisplayMember="Id"
                                HeaderText="Referenced Id"
                                ItemsSource="{Binding ListOfReferenced}"
                                MappingName="Referenced">
                                <syncfusion:GridMultiColumnDropDownList.Columns>
                                    <syncfusion:Columns>
                                        <syncfusion:GridTextColumn HeaderText="Id" MappingName="Id" />
                                        <syncfusion:GridTextColumn
                                            Width="220"
                                            HeaderText="Name"
                                            MappingName="Name" />
                                    </syncfusion:Columns>
                                </syncfusion:GridMultiColumnDropDownList.Columns>
                            </syncfusion:GridMultiColumnDropDownList>


Do you have any examples where a GridMultiColumnDropDownList  is used to set a property that references an object?

Thanks

1 Reply

MA Mohanram Anbukkarasu Syncfusion Team November 12, 2020 05:05 PM UTC

Hi Robert, 

Thanks for contacting Syncfusion support.  

We are little unclear with the reported issue. We have prepared a sample using the provided details and it is available in the following link for your reference.  


Please have a look at this sample and check you are facing the same issue in this. If yes, kindly share more details to reproduce the issue in our end. If possible provide any video/image illustration of the issue. It will be helpful for us to understand the scenario and to provide a prompt solution.  

Regards, 
Mohanram A. 




Loader.
Up arrow icon