We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Grid with foreignKeyField inline editing unexpected behavior

Hello everyone,
I have a hard time using grid with editing with foreignKeyField, I have done other grids with the same requirements usually this is with strange behavior.
When filtering the combobox and saving the first item everything happens normally, but when doing the second item on the grid the text of the item in the grid is blank but the requests usually occur bringing the correct data, but it is not displayed on the grid. If you click edit on the failed item and then save the data is loaded correctly.
Steps to reproduce.

1 - Attempt to add an item by filtering for "nova" then select any item that appears and then save.
2 - Add another item by filtering "telha" then select any item that appears and then save.

You will notice that the item first registered will disappear and the last one not.
You may also notice that all requests bring the correct data information but it is not placed on the grid.
Another detail is that this occurs only when combobox is filtered.

follows an example project.

Attachment: angularu9ae8c_79f7ab3c.zip

5 Replies

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team September 6, 2019 01:01 PM UTC

Hi Adriano,  

Greetings from Syncfusion.  

Usually, foriegnkey feature of the Grid will relate the Grid datasource with the Column dataSource. But your code example and application shows that your requirement doesn’t need the foreignkey feature. Because the datasource shown in the dropdown is same as the displayed value. Refer to the following Help Document for foreignkey relationship 


Regards,  
Seeni Sakthi Kumar S 



AN Adriano Nascimento September 6, 2019 01:45 PM UTC

Hello

I need the foriegnkey because the id, parentId information of the grid datasouce makes up the information you need.
where parentId is a combobox primary key so I specify both foreignKeyValue and foreignKeyField because the names are not equal.


In the documentation that has been passed on the name of foreingKey is the same as the relationship

I've done other grid with similar structure without problems and the error only occurs when combobox is filtered.



SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team September 9, 2019 02:31 PM UTC

Hi Adriano, 

We have validated your query provided with the information and we could see you are updating the query submitting the request to the server-end for the ‘TELHA’ value alone. This changes brings only the requested data i.e. single record only from the server-end which is the cause of the problem. This in turns showcase only the TELHA value alone and hides the other values.  
 
For your reference, we have shared the screenshot with your query and response details also.     

 


Regards, 
Seeni Sakthi Kumar S. 



AN Adriano Nascimento September 9, 2019 04:48 PM UTC

Hello,

I did not quite understand which part of what fails because the data is correctly brought into the combo and grid request which is the most important in this case, however the grid does not place correctly in the column.


https://drive.google.com/file/d/1t_seHHmr6Ki7K5mmFz1nsfAaSUOMEVWW/view?usp=sharing

https://drive.google.com/file/d/1t-Xq7791cs-m9nVSn8qzJs8P8XhpKH1I/view?usp=sharing


SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team September 11, 2019 02:04 PM UTC

Hi Adriano,  
 
We have logged the reported issue as a bug ‘Remotely bind the ForeignKey column is incorrect result in Filtering’ and it will be included after the Volume 3, 2019 in anyone of the Patch Release. Refer to the feedback link for further reference.  
 
 
Currently, it is pending for review and it will be available for you reference once after validate by our superior. 
 
Regards,  
Seeni Sakthi Kumar S 


Loader.
Up arrow icon