Option "0" returning null value

Greetings, everyone! Please help me to solve this mistery:

I have a Dropdown List with four options

It's based on a class called TipoFrete, and all of his properties are strings, just like the options of the dropdown

The problem happens when I select the fisrt option, which Id is the string "0". It returns the correct Text, but the Id turns into null:


I tried to Console.Writeline the args.ItemData.Id to check if the value is ok, and it shows the correct value:


But when I try to manipulate the value, it's null

I tried changing the value "0", putting the letter "x":

The problem only occurs when I select an option with Id "0".

Could you help me on this? Is it a bug, or I'm doing something wrong?

I'm sending the code for further details


Attachment: Testes_d5cdee5c.zip

1 Reply

PO Prince Oliver Syncfusion Team January 25, 2022 06:53 AM UTC

Hi Consensu, 

The code you shared works as expected in our end, we can get the value “0” when it is selected. We suspect that you might be using an older version, kindly update to the latest syncfusion version and check if this issue is resolved. If the issue still occurs, kindly share us the following details. 

  • Dot Net version
  • Blazor server side or Blazor WASM
  • Syncfusion package version
  • Browser details and machine details

This will help us replicate the issue in our end and provide a prompt solution. 

Regards, 
Prince 


Loader.
Up arrow icon