BindingSourceRefresh not refreshing in 3.6.3

BindingSourceRefresh not refreshing in 3.6.3

Old forum URL: forums.lhotka.net/forums/t/7188.aspx


Vinodonly posted on Monday, June 29, 2009

I moved to the latest ver of CSLA i.e. 3.6.3 and changed one of my BO's to managed properties.

On the form bindingsourcerefresh is also added and readvalues set to true for all binding source objects but values are not refreshing.

This was working previously and on the same form where normal properties are used values are getting refreshed.

I missed some points here.. It is windows form and there are no values added in app config for propertychanged mode so by default it should be windows..

I'm not sure whether it is a bug or am I missing something..

Vinodonly replied on Monday, June 29, 2009

Further to my previous msg.. this is only happenning when property is dispalyed in a textbox.

In DataGridview shortcuts are getting displayed properly even with managed fields..

This is how I have delcared the property..

private static PropertyInfo <SmartDate> DateOfBirthProp =
RegisterProperty(p => p.DateOfBirth);

public string DateOfBirth
{
get { return GetPropertyConvert(DateOfBirthProp); }
set {
SetPropertyConvert(DateOfBirthProp, value);
}
}

RockfordLhotka replied on Monday, June 29, 2009

I just tried ProjectTracker with the Windows Forms UI and its SmartDate-related properties are refreshing properly when compiled using 3.6.3.

Vinodonly replied on Monday, June 29, 2009

I have checked my code mutliple times and not able to understand why it is not refreshing..

Is there any thing else which I can check which can make this problem..

RockfordLhotka replied on Monday, June 29, 2009

The refresh would be triggered by the PropertyChanged event raised when the property is changed. I suppose you could manually add a PropertyChanged event handler and use the debugger to make sure you are getting the event as expected.

Vinodonly replied on Tuesday, June 30, 2009

I chkd the code in debugger and saw that propertyhaschanged event is getting triggered. It is expanding the shortcuts like ., + etc. and comparing both values and values are differing so it is raising propertyhaschanged but after that I was not able to track how bindingsourcerefresh is re-reading values..

I also noticed one more thing that my form is only using bindingsourcerefresh and not readwriteauthorization. I don't know if that makes any difference..

Vinodonly replied on Saturday, July 11, 2009

Can any additional help be provided on this issue. Now this is occuring in almost all the forms..

tetranz replied on Saturday, July 11, 2009

I've had forms where BindingSourceRefresh has stopped working. Deleting the component from the form and adding it again in the VS designer always fixes it for me.

Copyright (c) Marimer LLC