locked
user control of a textbox as assigned it the field of the table RRS feed

  • Question

  • I created a user control in a textbox as assigned it the field of the table where I record example my textbox1.value must record in the table clientes.estatus
    Wednesday, April 6, 2011 2:03 PM

Answers

  • When you select the user control in the screen designer, what does the "Data Binding" say?  Also, I'm confused as to why you've got a DataGrid in your xaml - I'm assuming your user control is bound to a field, not the entire collection.

    If so, you probably want something like this:

    <TextBox Text="{Binding StringValue}"/>

     


    Stephen Weatherford LightSwitch Dev Team
    Thursday, April 7, 2011 7:31 PM

All replies

  • Flex - are you asking how to data bind a textbox in a custom control you've written to an on screen entity? If so, the following blog post contains some code samples.

    http://blogs.msdn.com/b/lightswitch/archive/2011/01/13/using-custom-controls-to-enhance-lightswitch-application-ui-part-1.aspx

     

    Wednesday, April 6, 2011 3:41 PM
  • If Tim had already looked, but I do not understand what they do there is more complex that I want is more easy and do not understand
    Wednesday, April 6, 2011 3:46 PM
  • um , I think I'm a bit close but not is xaml hope someone help me

    DataGrid ItemsSource="{Binding Screen.fullnamecollection, Mode=OneWay}" 
    or 
    <datagrid ItemsSource="Binding screen.fullnamecollection" SelectedItem="{Binding Screen.Full_NameCollection.SelectedItem, Mode=TwoWay}">
    

    I'm not sure how to assemble the thing

    Thursday, April 7, 2011 2:12 AM
  • helpme please 
    Thursday, April 7, 2011 1:58 PM
  • When you select the user control in the screen designer, what does the "Data Binding" say?  Also, I'm confused as to why you've got a DataGrid in your xaml - I'm assuming your user control is bound to a field, not the entire collection.

    If so, you probably want something like this:

    <TextBox Text="{Binding StringValue}"/>

     


    Stephen Weatherford LightSwitch Dev Team
    Thursday, April 7, 2011 7:31 PM