#307970, #309376, #312888 - ODataV4 Patch request ignores boolean value false is fixed.|
public class Order
{
[Key]
public int Id { get; set; }
public string Name { get; set; }
public DateTime? RegistrationDate { get; set; }
public int CreditLimit { get; set; }
[DefaultValue(null)]
public bool Active { get; set; }
} |
How would you solve the limitation that patch ignores empty string. For example if I have a string value "test" and the clear the cell to "". The empty string does not get serialized, so it does not get patched.
Is there any fix to this limitation or do I have to use the Http Put method?
|
<SfGrid TValue="Order" @ref="GridInstance" AllowPaging="true" Toolbar=@ToolbarItems AllowFiltering="true">
<GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.Excel" />
<GridEditSettings AllowEditing="true" AllowAdding="true" AllowDeleting="true"></GridEditSettings>
<SfDataManager @ref="DM" Url=http://localhost:64956/odata/books Adaptor="Adaptors.ODataV4Adaptor"></SfDataManager>
. . . ..
</SfGrid>
@code{
SfGrid<Order> GridInstance;
SfDataManager DM { get; set; }
public string[] ToolbarItems = new string[] { "Add", "Edit", "Delete", "Update", "Cancel" };
protected override void OnAfterRender(bool firstRender)
{
base.OnAfterRender(firstRender);
if (DM != null)
{
RemoteOptions Rm = (DM.DataAdaptor as ODataV4Adaptor).Options;
Rm.UpdateType = HttpMethod.Put;
(DM.DataAdaptor as ODataV4Adaptor).Options = Rm;
}
}
|
Hi Vignesh, when I do this implementation it works great.
However, now when I click save the EditDialog closes when the server returns 500. Before when the server returned 500 when they did not input all the information required the dialog would stay open.
How can I get this original functionality back?
I am on 20.1.0.47 (VS2022/.NET6) and am experiencing the "ignores false" issue regardless of what I set my [DefaultValueAttribute] to. It will not send boolean false to the server. If the boolean is the only thing that has changed, it will send just the Id value in the body of the patch (literaly nothing else, just the Id).
Hi Josh,
Greetings from Syncfusion.
We are currently checking the reported query from our end and we will update the further details within two business days. Until then we appreciate your patience.
Regards,
Rahul
Hi Josh,
Thanks for your patience.
We have considered your query as a bug and logged the defect report “The boolean column value is not updated properly while changing the to false in ODataV4Adaptor” 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 will include the fix in our upcoming patch release which is expected to be rolled out on or before the first week of May 2022. Until then we appreciate your patience.
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.
Regards
Rahul
I am also experiencing this issue reported by Josh on 4/17/2022. I understand that you expect a fix the first week of May.
Hi Carl,
Greetings from Syncfusion.
Yes, we have considered the reported problem “The boolean column value is not updated properly while changing the to false in ODataV4Adaptor” as a bug. The fix for the issue is included in our upcoming patch release which is expected to be rolled out on or before the first week of May 2022. Until then we appreciate your patience.
Regards,
Rahul
Hi Carl,
Sorry for the inconvenience caused.
Due to some unforeseen circumstances, we could not able to include the fix for the issue “The boolean column value is not updated properly while changing the to false in ODataV4Adaptor" in our weekly patch release as promised. We will include this fix in our upcoming release, which is expected to be rolled out on or before 31th May 2022.
Until then we appreciate your patience.
Regards,
Naveen Palanivel.
Hello,
I have the same problem with the boolean field behavior. It's always true.
However, I'm wondering if this issue is related to the checkbox component. When using a SfListBox as follows:
The ValueChange function always receives all of the items in the list (not only the selected ones)
Could you please advise if it's the same issue with the checkbox component?
P.S. I'm using Syncfusion.Blazor 20.1.0.55
Thanks
Hi Erick,
Thanks for the update.
We have branched a separate Forum for the last query. Kindly follow up with the mentioned thread for the further follow ups.
Regards,
Naveen Palanivel.
Hello,
Regarding the issue “The boolean column value is not updated properly while changing the to false in ODataV4Adaptor", I found that declaring the column value as "bool?" (nullable), the OData adaptor sends the false value.
Regards,
Erick
Hi Erick,
Thanks for the suggestion.
The Boolean column value is updated when column type is defined as nullable bool. Still we have to fix the issue for the Boolean Type column. so we will update the after the fix issue.
Please get back to us if you have further queries.
Regards,
Naveen Palanivel.
Hi Erick,
Sorry for the Inconvenience.
we are not able to include the reported problem “The boolean column value is not updated properly while changing the to false in ODataV4Adaptor"” in our mentioned patch release as promised. We have planned to include this in our upcoming patch release which is expected to be rolled out by 14th June 2022.
Till then we appreciate your patience.
Regards,
Naveen Palanivel
Hi Erick,
Sorry for the Inconvenience,
we are not able to include the reported problem “The boolean column value is not updated properly while changing the to false in ODataV4Adaptor"” in our mentioned patch release as promised. We will fix the issue until please we suggest to use that declaring the column value as "bool?" (nullable), the OData adaptor sends the false value.
Regards,
Naveen Palanivel