I put a custom control in a specific column of DataGrid through EditTemplate, but it doesn't work.

Hello.

I wanted to create a simple control that pops up a list when clicking the search icon through the textbox of the read property and the search icon on the right, and that is displayed in the textbox of the read property when the list is selected, and uses it as an input to the datagrid.

The control I created is InputSearch and I used it like this:

                               
                                   
                                   
                                        @{ var info = context as 공정자재정보;
                                       
                                           
                                               
                                           
                                       
                                        }
                                   
                               



The symptom is that adding an item works fine.
But when I edit it, it goes to ActionBegin's Save.
The operation does not reach save, the dialog does not close and does not respond (in dialog edit mode).

If canceled, the editing dialog box is closed.

Even if you debug
In particular, even if an error occurs in the web browser, the error does not occur in the source code.

InputSearch consists of SfTextBox and Dialog.

I spend hours without finding the cause.

If you've ever experienced similar symptoms
I need some help that can be a hint.

thank.


2 Replies

SE Seil replied to Seil August 13, 2020 07:01 AM UTC

Hello.

I wanted to create a simple control that pops up a list when clicking the search icon through the textbox of the read property and the search icon on the right, and that is displayed in the textbox of the read property when the list is selected, and uses it as an input to the datagrid.

The control I created is InputSearch and I used it like this:

                               
                                   
                                   
                                        @{ var info = context as 공정자재정보;
                                       
                                           
                                               
                                           
                                       
                                        }
                                   
                               



The symptom is that adding an item works fine.
But when I edit it, it goes to ActionBegin's Save.
The operation does not reach save, the dialog does not close and does not respond (in dialog edit mode).

If canceled, the editing dialog box is closed.

Even if you debug
In particular, even if an error occurs in the web browser, the error does not occur in the source code.

InputSearch consists of SfTextBox and Dialog.

I spend hours without finding the cause.

If you've ever experienced similar symptoms
I need some help that can be a hint.

thank.


I found the cause. The problem was not the custom control I added, but it was malfunctioning if the datagrid's source Eitnty did not have a primary key.
The DataGridColumn has been tested with the property IsPrimaryKey = "true" and has been saved and deleted.

Another problem,
The entity I used has multiple keys. The DataGrid doesn't seem to recognize multiple keys.
It seems to be retrieving and updating via an inner query, perhaps, not recognizing multiple keys and recognizing the first column as a key, confirming that all rows have been updated. Fortunately, the first column has a fixed key value, so assigning IsPrimaryKey to the second column solved the problem.

Make sure your DataGrid supports multiple keys.

Thank you.


JP Jeevakanth Palaniappan Syncfusion Team August 13, 2020 08:58 AM UTC

Hi Seil, 
 
Greetings from syncfusion support. 
 
Query: The DataGrid doesn't seem to recognize multiple keys. 
 
Currently we don’t have support for multiple primary key column in Grid. But we have already considered this requirement as a feature and logged a feature task “Provide multiple primary key column support in Grid” for this and added to our feature request list. Based on specific parameters including product vision and technological feasibility we will implement this feature. This will be available in any of our upcoming releases.   
 
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. 
 
 
Please get back to us if you need further assistance.  
 
Regards, 
Jeevakanth SP. 


Loader.
Up arrow icon