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.
Unfortunately, activation email could not send to your email. Please try again.

Change UpdateSourceTrigger in PropertyGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

132865 Sep 26,2017 02:34 AM Sep 29,2017 02:04 AM WPF 5
loading
Tags: PropertyGrid
CSharpino
Asked On September 26, 2017 02:34 AM

Hi,

Can I change the UpdateSourceTrigger Mode to a PropertyGrid control?

Thank you

Keerthana Jegannathan [Syncfusion]
Replied On September 27, 2017 06:36 AM

Hi CSharpino,   
   
Thank you for contacting Syncfusion support.   
   
As we were not able to get your requirement clearly, please confirm whether you need to update value of some control based on change in PropertyGrid control. Based on your update, we will proceed further on this.   
   
Regards,   
Keerthana J   


CSharpino
Replied On September 27, 2017 07:40 AM

Hi, 

I need to update the value of the properties (FirstName, LastName, Age, ecc) of my business object Customer binding on the control.


<sync:PropertyGrid x:Name="CustomerPropertyGrid" SearchBoxVisibility="Hidden"

                           EnableGrouping="True" SelectedObject="{Binding Path=Customer}" />

Viewmodel:

public class CustomerDetailViewModel : GenericViewModel

{

private CustomerViewModel _customer = null;

public CustomerViewModel Header

 {

         get { return _customer; }

         set { SetProperty(ref _header, value); }

}

}


Keerthana Jegannathan [Syncfusion]
Replied On September 28, 2017 02:37 AM

Hi CSharpino, 
 
Thanks for your update. 
 
Based on your update, we have prepared sample with PropertyGrid control in which we bind the properties using the “CustomerView” class and it can be downloaded from the below location. 
 
 
Can you please check with the sample and let us know whether it meets your requirement? 
 
Regards, 
Keerthana J 


CSharpino
Replied On September 28, 2017 04:00 AM

This example does not change the default UpdateSourceTrigger mode...

The CustomerView property is update at each keystroke in the PropertyGrid field. 

I want to update CustomerView properties when the field loses the focus for example.


Keerthana Jegannathan [Syncfusion]
Replied On September 29, 2017 02:04 AM

  
Hi CSharpino, 
 
Thanks for your update. 
 
In PropertyGrid, we have changed the ContentPresenter based on data type. For example, if we are using Integer data type, then IntegerTextBox has been loaded. Therefore, we were not able to handle the UpdateSourceTrigger directly for the SelectedObject. Therefore, we request you to use the CustomEditor, which allows you to use specific control to specific data type in which you have updated the UpdateSourceTrigger for the particular property.  
 
We have modified our previous sample, in which we have used TextBoxEditor. It updates string data type properties when focus is lost and it can be downloaded from the below location. 
 
 
Also, please refer the below link to get to know more about PropertyGrid CustomEditor. 
 
 
Regards, 
Keerthana J 


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.

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.

;