locked
Problem when assigning form a domain service to a Textbox in User control constructor RRS feed

  • Question

  • When I assign data previously obtained from a domain service and stored in a static class to a textbox.text propriety within a UserControl constructor the visual designer throws errors related to the constructor, but the application does run in localhost but when deployed it fails to loas the User Control in question.

    Why?

    I have also seen this when assigning ItemSource to a combobox.

    The way I "fixed this" was changing in one case to a dataForm, the functionality required in other UserControls however, requires me to use a different control set than dataForm.

    Thank you in advance fo your valuable inputs.

    Carlos

    Friday, October 22, 2010 9:24 PM

All replies

  • Can you please give us the error message you are getting ?

    Thanks,

    Thani

    Saturday, October 23, 2010 2:59 AM
  • The error is:


    The invocation of the constructor on type <UserControl class> that matches the specified binding constraints threw an exception.


    The lines where the exception point are the


    txtBox1.Text = GlobalS.customers


    where


    GlobalS.customers are loaded from a Domain Service with EntityQuery and LoadOperation

    Saturday, October 23, 2010 6:57 AM
  • Hi,

    I think the problem is that the textbox object sill binding you have to clear binding first.  instead x:Name

    Regrads

    Saturday, October 23, 2010 8:14 AM
  • I'm sorry, I don't understand your suggestion.

    Can you explain a little more please.

    Carlos

    Monday, October 25, 2010 5:54 PM