No possibility to add elements on Grid with EditMode.Dialog

Hi, 

I have an issue : using Grid with the EditMode.Dialog mode, I can't add items to my Grid, even though I can edit and delete elements.

Actually, when I press the "save" button, nothing happens and the dialog remains (only at creation of elements as mentioned before). 

The fact is : It works with the EditMode.Batch mode.


Here is the code : 
------------------------------------------

<div class="col-lg-12 control-section" style="margin-bottom:15px">

        <div class="content-wrapper">

            <div class="row">

                <SfGrid ID="campaingGrid"

                        DataSource="@marketingCampaignList"

                        Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update", "Search" })"

                        AllowResizing="true"

                        AllowPaging="true"

                        AllowSelection="@boolSelect"

                        AllowSorting="true"

                        AllowFiltering="true">

                    <GridEditSettings AllowAdding="true"

                                      AllowEditing="true"

                                      AllowDeleting="true"

                                      Mode="EditMode.Dialog">

                    </GridEditSettings>

                    <GridPageSettings PageSize="5"></GridPageSettings>

                    <GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.Menu"></GridFilterSettings>

                    <!--<GridEvents RowSelected="RowSelectHandlerCampaign" TValue="MarketingCampaign"></GridEvents>

                    <GridEvents OnDialogSave="OnDial" TValue="MarketingCampaign"></GridEvents>-->


                    <GridColumns>

                        <GridColumn Field=@nameof(MarketingCampaign.MarketingCampaignName) HeaderText="Name" IsPrimaryKey="true" TextAlign="TextAlign.Right" Width="40"></GridColumn>

                        <GridColumn Field=@nameof(MarketingCampaign.MarketingCampaignDescription) HeaderText="Description" Width="45"></GridColumn>

                        <GridColumn Field=@nameof(MarketingCampaign.MarketingCampaignStartDate) HeaderText="Start Date" Format="dd.MM.yyyy" Type="Syncfusion.Blazor.Grids.ColumnType.Date" TextAlign="TextAlign.Right" Width="40"></GridColumn>

                        <GridColumn Field=@nameof(MarketingCampaign.MarketingCampaignEndDate) HeaderText="End Date" Format="dd.MM.yyyy" TextAlign="TextAlign.Right" Width="40"></GridColumn>

                        <GridColumn Field=@nameof(MarketingCampaign.MarketingCampaignType) HeaderText="Type" TextAlign="TextAlign.Right" Width="40"></GridColumn>

                        <GridColumn Field=@nameof(MarketingCampaign.MarketingCampaignGroup) HeaderText="Group" TextAlign="TextAlign.Right" Width="40"></GridColumn>

                        <GridColumn Field=@nameof(MarketingCampaign.MarketingCampaignStatus) HeaderText="Status" TextAlign="TextAlign.Right" Width="40"></GridColumn>

                        <GridColumn Field=@nameof(MarketingCampaign.MarketingCampaignExpectedRevenue) HeaderText="Expected Revenue" TextAlign="TextAlign.Right" Width="70"></GridColumn>


                    </GridColumns>

                </SfGrid>

            </div>

        </div>

    </div>

------------------------------------------

Have I missed something ? 
Thanks in advance.

Regards,


Quentin VEILLAS


7 Replies

JP Jeevakanth Palaniappan Syncfusion Team July 9, 2021 07:14 AM UTC

Hi Quentin, 
 
Greetings from Syncfusion support. 
 
We have validated your query by preparing a sample based on your scenario but unfortunately we are unable to reproduce the reported problem from our end. We have attached the validated sample and the video demonstration for your reference. Please find it below. 
 
 
 
Documentation and OnLine demo for Dialog editing: 
 
Incase if you are still facing the issue then kindly share us the below details. 
 
  1. Share us the Syncfusion NuGet version details.
  2. Kindly share us the simple runnable issue reproducing sample or reproduce the issue in the above sample.
 
The above requested details will be helpful for us to validate the problem and provide you with a better solution as early as possible. 
 
Regards, 
Jeevakanth SP. 



VE VeillasInc July 10, 2021 11:17 PM UTC

Everything is OK ! Thanks ! 



JP Jeevakanth Palaniappan Syncfusion Team July 12, 2021 05:22 AM UTC

Hi VeillasInc, 
 
Thanks for the update. We are glad that your query is resolved. Please get back to us if you have any other queries. 
 
Regards, 
Jeevakanth SP. 



HU Huub September 23, 2021 09:48 AM UTC

I have the exact same issue, how did you solve it?


Editing/deleting works fine, but when adding, the save button does not seem to trigger any Grid events, it only seems to check the validation rules.

And because of this post I've tried if batch-editing works, and like you've said, this does work.


The exact same lines of code work in another solution using the same versions of the Syncfusion Nuget packages.




JP Jeevakanth Palaniappan Syncfusion Team September 24, 2021 06:42 AM UTC

Hi Stan, 

We have checked the reported problem but still we are unable to reproduce the it from our end. As you said, the same code working in another solution, so we suggest you to ensure the problem by using the below steps. 

  1. Clear the Nuget cache using Tools -> Nuget Package Manager –> Package Manager Settings -> Clear Nuget cache.
  2. Delete the bin and obj folders.
  3. Then run the application and ensure the problem.
Regards, 
Jeevakanth SP. 



HU Huub September 24, 2021 06:52 AM UTC

Thank you for the suggestions.

These steps didn't help but I've found a workaround.

Adding works when I use a custom class with a nullable ID field.

After this I could add items as expected.

Regards,

Stan



JP Jeevakanth Palaniappan Syncfusion Team September 27, 2021 05:25 AM UTC

Hi Stan, 

We are glad that the reported problem is resolved. Get back to us if you have any other queries. 

Regards, 
Jeevakanth SP. 


Loader.
Up arrow icon