Silverlight data binding breaks when there is no debugger attached -



Silverlight data binding breaks when there is no debugger attached -

ok, bit of unusual 1 - , it's simple i'm pretty new silverlight!

i have object next property:-

private int targetid = null_target_value; [display(name="target", order=1)] [required] public int targetid { { homecoming targetid; } set { if (this.targetid != value) { this.validateproperty("targetid", value); this.targetid = value; this.raisepropertychanged("targetid"); } } }

this object created using dataform toolkit. utilize autogeneratingfield event alter item combo box drop downwards code below:

if (e.propertyname == "targetid") { combobox target = new combobox() { displaymemberpath = "title", selectedvaluepath = "itemid" }; target.itemssource = taskmanager.manager.ganttitemsource; var selecteditem = taskmanager.manager.ganttitemsource.firstordefault(p => p.itemid == parenttargetid); target.selecteditem = selecteditem; e.field.replacetextbox(target, combobox.selectedvalueproperty, binding => binding.converter = new targetnullvalueconverter()); break; }

this result in drop downwards expect. on save button event have code:

if (registerform.validateitem()) { this.task.save(); }

if debugger attached silverlight project works great. if it's not validateitem returns false thinks have added invalid target ("input not in right format" exact validation error get).

any ideas appreciated! (btw confirm happens in both release , debug build modes, attaching or removing debugger causes occur)

dammit, issues downwards line in autogeneratingfield event:-

e.field.replacetextbox(target, combobox.selectedvalueproperty, binding => binding.converter = new targetnullvalueconverter());

this allows work

e.field.replacetextbox(target, combobox.selectedvalueproperty);

which makes sense because i'm dealing ints not objects. still don't know why works debugger attached however!

silverlight

Comments

Popular posts from this blog

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

How do I check if an insert was successful with MySQLdb in Python? -