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

Change UpdateSourceTrigger in PropertyGrid

Hi,

Can I change the UpdateSourceTrigger Mode to a PropertyGrid control?

Thank you

5 Replies

KJ Keerthana Jegannathan Syncfusion Team September 27, 2017 10:36 AM UTC

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   



CS CSharpino September 27, 2017 11:40 AM UTC

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); }

}

}



KJ Keerthana Jegannathan Syncfusion Team September 28, 2017 06:37 AM UTC

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 



CS CSharpino September 28, 2017 08:00 AM UTC

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.



KJ Keerthana Jegannathan Syncfusion Team September 29, 2017 06:04 AM UTC

  
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 


Loader.
Live Chat Icon For mobile
Up arrow icon