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

getting rowrecord, editing this one in new dialogwindow and submit the new record back and override the old record

Dear admin,

i'm new with your controls and i'm trying to learn the mvvm-style. My problem is this one:

I have a datagrid which one is filled with an observable collection list from a database. Now what i'm searching for is a possibility to open an EditDialogWindow when i doubleclick a single row to edit the record of this row. The EditDialogWindow should fill all textboxes with the data of the selected row and the textboxes should be able for editing too so i can change their values. At the end i want to get the new values for every single property and override the old ones if the user clicks a submitbutton, else if he clicks a cancel- or the closewindowbutton the rowrecord should be the old one as before editing. 

I try to achieve all of this in MVVM-style and hope you can help me further and maybe provide a sample at this direction.

Thanks and Regards,

S.Bauer

4 Replies

JN Jayaleshwari N Syncfusion Team November 14, 2018 06:41 AM UTC

Hi Sascha, 
 
Thanks for Contacting Syncfusion Support. 
 
We have checked the reported query “To show EditDialogWindow when double clicking in a row” from our side. You can achieve your requirement by using  PreviewMouseDoubleClick event of SfDataGrid. We have prepared and attached the sample for your reference. You can download form the following location. 
  
 
Please let us know, if you need any further assistance on this. 
 
Regards, 
Jayaleshwari N 



SB Sascha Bauer November 14, 2018 12:45 PM UTC

I'm gonna try your methode for my project but it looks fine at the first view. If i have any further problem, i let you know. 

Thanks for your time and best regards.

S.Bauer


SB Sascha Bauer November 14, 2018 02:35 PM UTC

I tested the sample, but the first thing i explored: in the double click behavior is an issue, it doesnt always get the actual mouseposition and the position is always wrong if i move the window where the datagrid exists. Also in your sample is at the lowest records no double click event, instead its the normal editing of sfdatagrid. I think thats the same problem i mentioned before.


DY Deivaselvan Y Syncfusion Team November 15, 2018 09:34 AM UTC

Hi Sascha, 
 
Please find response for your query below 
 
S.No 
Query 
Answer 
it doesnt always get the actual mouseposition and the position is always wrong if i move the window where the datagrid exists 
In the sample provided in the previous update, we have maintained the popup position based on the SfDataGrid. Because of that, the position of popup changes if you move the window where datagrid exists. Now we have modified the sample to show popup at same location even when you move the window. Please find it in below link 
 
Sample Link: 
 
Also in your sample is at the lowest records no double click event, instead its the normal editing of sfdatagrid. I think thats the same problem i mentioned before 
We are unable to reproduce the reported “normal editing occurs for lowest records instead of dialogu editing” issue at our end. Please find tested video demo from our end in below link 
 
Video Link: 
 
Also please use the sample provided for query 1. If still you are facing issue, can you please revert us with the modified sample or video demo for further investifation to provide appropriate solution at earlier. 
 
Please let us know, if you have any concern. 
 
Regards,

Deivaselvan

Loader.
Live Chat Icon For mobile
Up arrow icon