StrataFrame Forum

FieldBinding -> Dont clear textfield on new entry

http://forum.strataframe.net/Topic21710.aspx

By Philipp Guntermann - 1/28/2009

Hi,

i have a textfield that is populated based on the selection of a combobox. therefore i need that textfield to not be cleared when in the "new row" mode. also it should allways be disabled.

By Edhy Rijo - 1/29/2009

Hi Philipp,

If this textbox is binded to a field in the BO when you add a new row it will clear up the value, that is the default behavior.  If you don't want that, you can always use a textbox which is not binded and with the property IgnoreManageReadOnlyState = True, then you will need add some code to update the proper BO.field with the value of the textbox when saving if that is needed.

By Philipp Guntermann - 1/29/2009

Hi,

hmm well, i now use the editstate-changed event to apply data to the controls when the edit-state is "add".

that works so far. not sure if its "meant" to be done like that tho.

By Edhy Rijo - 1/29/2009

Philipp Guntermann (01/29/2009)[hrnot sure if its "meant" to be done like that tho.

Me neither, but if it is working, I would leave it, unless somebody else have a better idea.