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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

140824 Nov 8,2018 01:45 PM UTC Nov 15,2018 09:34 AM UTC WPF 4
loading
Tags: SfDataGrid
Sascha Bauer
Asked On November 8, 2018 01:45 PM UTC

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

Jayaleshwari N [Syncfusion]
Replied On 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 


Sascha Bauer
Replied On 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

Sascha Bauer
Replied On 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.

Deivaselvan Y [Syncfusion]
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;