Cascading Dropdown in grid edit

Hi, 

Im currently using the latest service pack (23.2.4).

I have a custom grid edit dialog and inside of that i have a cascading dropdown.

When im selecting a value from the first dropdown, it is supposed to enable the second dropdown and change the query but it does nothing.

I will drop my file, it is a small example of my problem.


Thanks a lot

Anthony !


Attachment: Test_b3564542.zip

1 Reply 1 reply marked as answer

PS Prathap Senthil Syncfusion Team December 8, 2023 06:58 AM UTC

Hi Anthony Benoit,

Based on your problem ,we would like to inform you that we have prevented unwanted rendering of Grid component during the external action for better performance. So, we suggest you use PreventRender(false) on value change event to reflect the changes in second dropdown to achieve your requirement. Kindly refer the attached code snippet for your reference.


  public void ChangeCountry(Syncfusion.Blazor.DropDowns.ChangeEventArgs<int?, Client> args)

  {

      if (args.Value == null || args.Value == 0)

      {

          EnableStateDropDown = false;

      }

      else

          EnableStateDropDown = true;

      this.StateQuery = new Query().Where(new WhereFilter() { Field = "Id", Operator = "equal", value = args.Value, IgnoreCase = false, IgnoreAccent = false });

      this.StateValue = 0;

      Grid.PreventRender(false);

  }

 


Sample Link: https://blazorplayground.syncfusion.com/embed/hjLKsVjlBAecLssH?appbar=false&editor=true&result=true&errorlist=false&theme=bootstrap5

Documentation: Cascading DropDownList in Blazor DataGrid Component | Syncfusion


Regards,
Prathap S


Marked as answer
Loader.
Up arrow icon