Dropdown not appearing in Grid's Add/Update Mode - Version 18.2.0.47

After upgrading project to Syncfusion version 18.2.0.47 I am facing an issue in Grid. It was working fine in version 18.1. 

I have a requirement to save student’s subject wise marks, for this I am using two drop down editor in grid one for student and second for subject. 

When I initialize data source with empty records and then I press “+ Add” button it never shows any drop down editor in grid. 

And if grid data source contain one or more records it shows drop downs editor in edit and add mode. But when I delete all rows, again it never shows any drop down editor in add mode.

 Here is my code. alos attached my code project.

<SfGrid DataSource="results" AllowPaging="true" AllowSorting="true" Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" })">

                <GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true"></GridEditSettings>

                <GridColumns>

                                <GridColumn Field="@nameof(StudentResult.Id)" IsPrimaryKey="true"></GridColumn>

                                <GridColumn Field="@nameof(StudentResult.StudentId)" DataSource="students" EditType="EditType.DropDownEdit" ForeignKeyField="Id" ForeignKeyValue="Name"></GridColumn>

                                <GridColumn Field="@nameof(StudentResult.SubjectId)" DataSource="subjects" EditType="EditType.DropDownEdit" ForeignKeyField="Id" ForeignKeyValue="Name"></GridColumn>

 

                                <GridColumn Field="@nameof(StudentResult.MarkObtain)" Edit="EditType.NumericEdit" Format="######"></GridColumn>

                </GridColumns>

</SfGrid>

 

@code {

 

public List<StudentResult> results { get; set; }

                public List<Student> students { get; set; }

                public List<Subject> subjects { get; set; }

 

                protected override async Task OnInitializedAsync()

                {

                                await base.OnInitializedAsync();

                                students = new List<Student>

                                {

                                                new Student{Id=1, Name="Steve Smith"},

                                                new Student{Id=2, Name="Tony Robbins"}

                                };

 

                                subjects = new List<Subject>

                                {

                                                new Subject{ Id=1, Name="History"},

                                                new Subject{Id=2, Name="Computer Science"},

                                                new Subject{Id=3, Name="Law"}

                                };

                                // New Record

                                results = new List<StudentResult>();

 

                                // Edit Record

                                //results = new List<StudentResult>() { new StudentResult { Id = Guid.NewGuid().ToString(), StudentId = 1, MarkObtain = 22, SubjectId = 1 } };

 

                                StateHasChanged();

                }

 

}


Attachment: BlazorGridDropDownApp_a81c533f.7z

1 Reply 1 reply marked as answer

RS Renjith Singh Rajendran Syncfusion Team July 30, 2020 11:54 AM UTC

Hi Jawaid, 

Greetings from Syncfusion support. 

We have confirmed it as a bug and logged the defect report “DropdownList for ForeignKeyColumn not shown in Add form in an Empty Grid” for the same. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle) and including the defect fix in our upcoming Bi-weekly release which is expected to be rolled out by the end of August, 2020.   
  
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.  

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran 


Marked as answer
Loader.
Up arrow icon