On editing the grid row, unmodified dropdown field is auto setting to first item on the DataSource list.

I have a grid with a string field with EditType as DropDown.
When editing the row, if I dont change the value os the field, it automatically sets as the first item of the DataSource list, regardless os the previous value, which should stay unchanged.
The exibited string does not change, but on the specified server function for update, the model received has the new changed value
This behavior causes a flaw on the item every time any other column is updated.
Looking for a solution, but haven't found anyting related.
Please, help.
Thank you.

3 Replies

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team July 6, 2018 12:49 PM UTC

Hi Bruno, 

Thanks for contacting Syncfusion Support. 

We have checked your query and we suspect that the reported problem may occur when we doesn’t enable IsPrimaryKey property of the Grid. Because IsPrimaryKey property has been necessary to perform Editing operations in Grid. Please confirm whether you have used isPrimaryKey property. 

Please refer to the code example:- 

We need some additional information to find the cause of the issue. Please share us the following details. 

1. Have you used any EditMode template and render the dropdownList. 

2. Complete Grid code example(both in client and client side). 

3. Have you set any setCellValue or selectedItemIndex value while on rendering the dropdownList. 

The provided information will be helpful to provide you response as early as possible. 

Regards, 
Farveen sulthana T 



BR bruno roger stupp July 6, 2018 01:32 PM UTC

There is a column with IsPrimaryKey property in the grid, not the one i'm having poblems with, but a hidden ID column.

.EditSettings(
                edit =>
                {
                    edit.AllowAdding()
                        .AllowDeleting()
                        .AllowEditing()
                        .EditMode(EditMode.Normal);
                }
            )

Those are my only edit settings, i have no template, i'm using the default controls for the grid.

None of the setCellValue or selectedItemIndex properties is set.

On looking at the example indicated, it has basically the same properties on the columns


I'm using Syncfusion.EJ.MVC.dll, v14.1500.0.46 version (for clarification).

EDIT:

-Found out that the 
.ClientSideEvents( eve =>
            {
                eve .ActionComplete("querycell")
The querycell function on javascript was messing with tha values os the fields related.
The problem was solved, and i'm sorry for wasting your time with this problam,
Thanks for the assistence.



FS Farveen Sulthana Thameeztheen Basha Syncfusion Team July 9, 2018 11:06 AM UTC

Hi Bruno, 

Thanks for your update. Please get back to us if you need any further assistance. 

Regards, 

Farveen sulthana T 


Loader.
Up arrow icon