Basic Question on Binding

I am missing something obvious!! All I want to do is bind a property of an Entity to a textbox in a WPF grid. I have spent ages reading the various tutorials and seem to have failed to grasp what is needed. I can easily do it without binding but that would
defeat the object of trying to understand binding.
My XAML is
<Grid x:Name="grdName" HorizontalAlignment="Left" Height="55" Margin="65,62,0,0" VerticalAlignment="Top" Width="268" Background="#FFE3E3E3" >
<TextBox x:Name="txtSurname" HorizontalAlignment="Left" Height="24" Margin="106,21,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="63" TextChanged="txtSurname_TextChanged" DataContext="{Binding Path=Surname}"/>
and the code-behind is
private void cmbPersonKey_SelectionChanged(object sender, SelectionChangedEventArgs e)
string p = cmbPersonKey.SelectedValue.ToString();
Person thisPer = Helpers.context.People.Find(p);
this.grdName.DataContext = thisPer;
this.Show();
John Meers

You are setting the DataContext of the Grid to a Person object in your event handler. This means that any UI element in the Grid can bind to any property of the this Person object. For the Text to show up in the TextBox you should bind its Text property
to a public property of the Person class:
<TextBox x:Name="txtSurname" HorizontalAlignment="Left" Height="24"
Margin="106,21,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="63"
TextChanged="txtSurname_TextChanged" Text="{Binding Path=Surname}"/>
If this doesn't work you need to make sure that your Helpers.context.People.Find method actually returns a Person object, that this Person object has a
public property named "Surname" and that this property has a value.
Hope that helps.
Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

Similar Messages

  • MapViewer - A team of newbies and definitely basic questions...

    Dear All,
    We are a team of programmers who are very new to MapViewer. We are an experienced team of GIS programmers, however, we find difficulty in applying known functions to MapViewer. It's a great application, but a lot of unknowns.
    We have very basic questions, as well as advanced ones. I would like to summarize them as follows:
    1. How can I let the map to be zoomed into a specific feature?
    2. How can I execute a query to find a specific feature?
    3. How can I execute network analysis query to find the shortest path or paths between two or more nodes?
    4. How can I find out the nearest node to the location when user clicks on an arbitrary location on the map?
    5. How can I execute generic queries, without (this is important) need to send/receive XML queries?
    6. The bottomline is: we just want to use ready made functions to make it as easy as possible.
    Anyhelp is greatly appreciated. We are stuck with the basics of MapViewer (Oracle Maps).
    Please help us find the light :)
    Best regards.
    Desperate MapViewer Team!

    Here are some quick answers, hopefully they are not too late.
    1. You will construct a theme (mostly a dynamic one) that contains the specific feature, then call the theme's setBoundingTheme(true). Typically what we see people do is: a) create a dynamic theme with a query that selects a set of features; b) create a FOI layer based on the theme (MVThemeBasedFOI); c) call the setBoundingTheme(true) on the FOI layer. The end result, is that MapViewer will process your query and return the FOI data to the Oracle Maps JavaScript client, which will zoom the map to include the set of features in the FOI layer. Check out Oracle Maps tutorial #35 for an example.
    2. This is partly answered above. Basically you will construct a theme with a dynamic query string. You may want to check out tutorial #37 which finds out and displays the buffers around a set of points; the buffers are constructed via a SQL query at run time.
    3. This is not really a MapViewer question; rather, you may need to consult the Oracle Spatial routing engine XML API; the gist is you send the XML route request to the routing server, which returns a set of coordinates for your directions, which you can construct (MapViewer) FOI objects out of and display them on the map.
    4. I'm not sure our routing engine or network data model API has such a function ready for use; what you can do is if you can formulate the SQL query string (with the current location represented as a binding variable), then you can create a theme out of this query condition, and simply supply the location at run time to get the set of nodes.
    5. Can you please elaborate on what do you mean by generic queries? A simple usage scenario will help.
    6. We understand; there are quite a lot of things that can be made easier out of the box and we are working towards that. in the mean time, just ask questions if you have them; and always check out the Oracle maps tutorials first (actually reading the MapViewer primer article should be the absolute first step :) ).
    thanks
    LJ

  • Spate of basic questions in webdynpro forum

    Hi SDNers,
    I would like to bring into your notice that last two days many basic questions have flooded the webdynpro forum. The questions contain something like "what is the purpose of .....", where it is used ?etc.
    I was wondering that if someone doesn't even know the purpose of using some feature, what could cause them to post a question on the same..doesn't seem like there was some requirement with them. Its not just one or two questions but numerous, theoretical and on so many different topics. As if they have been given a question paper and they want quick, ready made answers without caring to search the SDN or help documentation.
    We have also not refrained ourselves from answering such questions (Some of us must be unaware that there was a series of such questions to follow, when we answered the initial ones). We are here to discuss and learn more, together, when we try to solve the queries posted in forums & hence threads such as the following are really irritating.
    Here are some of recent threads:
    system template
    JCo Destinations
    Object Value Selector
    Supply functions
    Server Side Eventing
    Viewset
    Structure binding
    Development Components
    Repository
    /thread/1290675 [original link is broken]
    Service Controller
    Model object
    Message Pool
    I only wanted to share what I thought as incorrect & I found this forum most suitable for posting this thread. I personally think that we should discourage such queries but then it is upto an individual's discretion and opinion to post a reply to them.
    Regards,
    Anagha

    Keep hitting the Report Abuse button. Most repeat offenders lose their accounts if they dont mend their ways after a couple of warnings.
    pk

  • Basic question

    Hello, i have a basic question. if i have defined 2 fields in a cube or a dso:
    Name Quantity
    and from the external flat file i get some characters for my quantity field. would my load fail?  for standard dso and for write optimized?
    NOTE: quantity field is a keyfigure defined as numeric.
    and the load coming in has "VIKPATEL" for Quantity field and not numbers.
    thanks

    Hi Vik,
    Yes, the load will fail.
    May be you coud first load this data into BW (into PSA) and set both fields as characters fields. Then you can create DSO, do transformation from this PSA to the DSO, and put your logic as to what do you want to do with those Quantity that is not number (e.g. convert to 0, or 'Not assgined', etc).
    You can use transfer rule, or a clean up ABAP code in the start routine.
    Hope this helps.

  • Pl/sql vs sql basic question

    Hi,
    I have a very very basic question, so excuse me for that... I just would like to know the difference ( and the difference in usage) between sql and pl/sql?
    thank you
    Yann

    SQL - the structured query language - is the language available for extracting data from the database. It is a 4GL, and each command stands alone and performs a database action.
    PL/SQL is the 3GL primarily intended to control the flow of a series of SQL commands. PL/SQL does not, in any way, interact with the data in the database. It does, however, allow SQL statements to be called, or even created, in a specific order.
    SQL is capable of a LOT more than people usually realize. Unfortunate, as people often create PL/SQL programs when single SQL statements will do the job. I encourage reading the O'Reilly 'Mastering Oracle SQL' book ... only after fiunishing that book do I recommend any of Feuerstein's excellent PL/SQL books.

  • Basic questions on data modeling

    Hi experts,
    I have some basic questions regarding data modeling within MDM. I understand the available table types and the concept of lookup fields. I know that the MDM data modeling concept is different to the relational concept. But having a strong database background my first step was to design a relational data model which I would like to transfer to a MDM repository. Unfortunately I didn't found good information material on this. So here are some questions maybe you can help me:
    1) Is it the right approach to model n:m relationships with multivalued lookup fields? E.g. main table Users with lookup field from subtable SapAccounts (a user can have accounts in different SAP systems, that means more than one account).
    2) Has a record always be unique in MDM repositories (e.g. should we use Auto ID's in every table or do we have to mark a combination of fields as unique)? Is a composite key of 2 or more fields represented with marking these fields as unique?
    3) The concept of relationships in MDM is only based on relationships between single records (not valid for all records in a table)? Is it necessary to define all relationships similar to the relational data model in MDM? Is there something similar to referential integrity in MDM?
    4) Is it possible to change the main table to a sub table later on if we realize that it has also to be used as a lookup table for another table (when extending the data model) or do we have to create a new repository from scratch?
    Thank you for your answers.
    Regards, bd

    Yes you are correct. It is almost difficult to map relational database to mdm one. But again MDM is not 'just' a database. It holds much more 'master' information as compared to any relational db.
    1) Is it the right approach to model n:m relationships with multivalued lookup fields? E.g. main table Users with lookup field from subtable SapAccounts (a user can have accounts in different SAP systems, that means more than one account).
    Yes Here you need to use MV look up tables or can also try Qualifier tables if it gets more complex
    2) Has a record always be unique in MDM repositories (e.g. should we use Auto ID's in every table or do we have to mark a combination of fields as unique)? Is a composite key of 2 or more fields represented with marking these fields as unique?
    Concept of uniqueness differs here that you also have something called Display Fields (DF). A combination of DF can also be treated as Unique one. For instance while importing records if you select these DF as a combination, you will eliminate any possible of duplicates based on this combination. Auto Id is one of the ways to have a unique id once record is within MDM. While you use UF or DF to eliminate any possible duplicates at import level
    3) The concept of relationships in MDM is only based on relationships between single records (not valid for all records in a table)? Is it necessary to define all relationships similar to the relational data model in MDM? Is there something similar to referential integrity in MDM?
    Hmm... good one. Referencial Integrity. What I assume you are talking is that if you have relationships between tables then removing a record will not be possible as it is a foreign key for some record. Here MDM does not allow that. As Relationships within MDM are physical and not conceptual. For instance material can have components. Now if material does not exist then any relationship to components is not worthwile to maintain. Hence relationshsip is eliminated.  While in relational model relationships are more conceptual. Hence with MDM usage of lookups and main table you do not need to maintain these kind of relationships on your own.
    4) Is it possible to change the main table to a sub table later on if we realize that it has also to be used as a lookup table for another table (when extending the data model) or do we have to create a new repository from scratch?
    No. It is not possible to convert main table. There is only one main table and it cannot be changed.
    I went for the same option but it did not work. What I suggest is to look up your legacy system one by one and see what fields in general can be classified as Master, Reference, Transactional - You will start getting answers immediately.

  • HT1311 I know this is a basic question, however, how do i change my pass word on itunes to stop my kids from automatically buying tunes from the I store... as my card details are already saved they just log in with their ipods and download via my account

    I know this is a basic question, however, how do i change my pass word on itunes to stop my kids from automatically buying tunes from the I store... as my card details are already saved they just log in with their ipods and download via my account

    http://support.apple.com/kb/HE36
    Regards.

  • HT1848 Forgive such a basic question, it's easier than looking it up.  I have my iTunes music on macbook pro and have only synced it to one iPod.  I want to buy a new iPod and want to know will I be able to sync my music from computer to new iPod at no ch

    Forgive such a basic question, it's easier than looking it up.  I have my iTunes music on macbook pro and have only synced it to one iPod.  I want to buy a new iPod and want to know will I be able to sync my music from computer to new iPod at no charge?

    will I be able to sync my music from computer to new iPod at no charge?
    Yes, you will.

  • Basic question regarding SSIS 2010 Package where source is Microsoft Excel 97-2005 and there is no Microsoft office or Excel driver installed in Production

    Hi all,
    I got one basic question regarding SSIS 2010 Package where source is Microsoft Excel 97-2005. I wanted to know How this package works in production where there is no Microsoft office or Excel driver installed. To check that there is excel driver installed
    or not, I followed steps: Start-->Administrative Tools--> Data Sources(ODBC)-->Drivers and I found only 2 drivers one is SQL Server and another one is SQL Server Native Client 11.0.
    Windows edition is Windows Server 2008 R2 Enterprise, Service Pack-1 and System type is 64-bit Operating System.
    We are running this package from SQL Server Agent and using 32-bit (\\Machine_Name\d$\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\DTExec.exe /FILE "\\Machine_Name\d$\ Folder_Name\EtL.dtsx" /CONFIGFILE "\\Machine_Name\d$\Folder_Name\Config.dtsConfig"
    /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING E) to run this package. I opened the package and tried to find out what connection we have used and found that we have used "Excel Connection Manager" and ConnectionString=Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=F:\Fares.xls;Extended Properties="EXCEL 8.0;HDR=YES"; and source is ‘Excel Source’
    I discussed with my DBA and He said that SSIS is having inbuilt Excel driver but I am not convinced.
    Could anyone please clear my confusion/doubt?
    I have gone through various links but my doubt is still not clear.
    Quick Reference:
    SSIS in 32- and 64-bits
    http://toddmcdermid.blogspot.com.au/2009/10/quick-reference-ssis-in-32-and-64-bits.html
    Why do I get "product level is insufficient..." error when I run my SSIS package?
    http://blogs.msdn.com/b/michen/archive/2006/11/11/ssis-product-level-is-insufficient.aspx
    How to run SSIS Packages using 32-bit drivers on 64-bit machine
    http://help.pragmaticworks.com/dtsxchange/scr/FAQ%20-%20How%20to%20run%20SSIS%20Packages%20using%2032bit%20drivers%20on%2064bit%20machine.htm
    Troubleshooting OLE DB Provider Microsoft.ACE.OLEDB.12.0 is not registered Error when importing data from an Excel 2007 file to SQL Server 2008
    http://www.mytechmantra.com/LearnSQLServer/Troubleshoot_OLE_DB_Provider_Error_P1.html
    How Can I Get a List of the ODBC Drivers that are Installed on a Computer?
    http://blogs.technet.com/b/heyscriptingguy/archive/2005/07/07/how-can-i-get-a-list-of-the-odbc-drivers-that-are-installed-on-a-computer.aspx
    Thanks Shiven:) If Answer is Helpful, Please Vote

    Hi S Kumar Dubey,
    In SSIS, the Excel Source and Excel Destination natively use the Microsoft Jet 4.0 OLE DB Provider which is installed by SQL Server. The Microsoft Jet 4.0 OLE DB Provider deals with .xls files created by Excel 97-2003. To deal with .xlsx files created by
    Excel 2007, we need the Microsoft ACE OLEDB Provider. SQL Server doesn’t install the Microsoft ACE OLEDB Provider, to get it we can install the
    2007 Office System Driver: Data Connectivity Components or
    Microsoft Access Database Engine 2010 Redistributable or Microsoft Office suit.
    The drivers listed in the ODBC Data Source Administrator are ODBC drivers not OLEDB drivers, therefore, the Excel Source/Destination in SSIS won’t use the ODBC driver for Excel listed in it by default. On a 64-bit Windows platform, there are two versions
    of ODBC Data Source Administrator. The 64-bit ODBC Data Source Administrator is C:\Windows\System32\odbcad32.exe, while the 32-bit one is C:\Windows\SysWOW64\odbcad32.exe. The original 32-bit and 64-bit ODBC drivers are installed by the Windows operating system.
    By default, there are multiple 32-bit ODBC drivers and fewer 64-bit ODBC drivers installed on a 64-bit platform. To get more ODBC drivers, we can install the 2007 Office System Driver: Data Connectivity Components or Microsoft Access Database Engine 2010 Redistributable.
    Besides, please note that 2007 Office System Driver: Data Connectivity Components only install 32-bit ODBC and OLEDB drivers because it only has 32-bit version, but the Microsoft Access Database Engine 2010 Redistributable has both 32- bit version and 64-bit
    version.
    If you have any questions, please feel free to ask.
    Regards,
    Mike Yin
    TechNet Community Support

  • If I upgrade to Mountain Lion on the computer that will install it, will my WIFI still work on the computer that cannot be upgraded? I know this is a very basic question

    If I upgrade to Mountain Lion on the computer that will install it, will my WIFI still work on the computer that cannot be upgraded? I know this is a very basic question. Trying to hold out as long as I can, but purchasing an iPhone for Christmas and new iMac next year when warrently expires.

    Thank U very much for the quick reply, I wanted to upgrade this weekend, but still on the fence. I can live with the software that is not compatible, they are on another compuetr, just didn't want the obvious stuff to stop working.

  • Basic questions about Infocube

    Hi, everyone.
    I got very basic questions about infocube data handling.
    With infopackage, I extracted all the data about employees from R/3.
    But there were some mistakes during inputting employee data, like positions,
    so I just extracted those employees data once more.
    Now I have two requests in infocube, where the first one has some wrong data.
    Is there any solutions about this?
    I might got it all wrong, so as beginner, any suggestions and explanations will
    be grateful.

    Hi,
    You can manually delete the earlier request by going in the Manage option of the cube. select the request and click on delete icon at the bottom.
    Other option is to make setting in the Infopackage to delete similar or overlapping request.
    Data target tab --> 6th column Automatic loading / deletion of similar request. --> click on the blank icon --> you will get a pop-up --> select the radio button - "delete existing request" --> Select Conditions --> Infosource are same, datasource are same and source system are same, --> selections are "Same or  More Comprehensive "
    Assign points if useful
    Regards
    Venkata Devaraj !!!

  • Basic Questions

    Hi all,
    I´ve some basic questions - we are seeking for an alternative for our MS Exchange System. So I need some more information before going to hot testing Oracle :-)
    - Does Oracle Coll. support multiple Domains? Not only subdomains - either completley different Domains?
    - Is it possible to create multiple Users via SQL (Massgeneration)?
    A more technical question:
    On my first testing (Solaris 10, Sparc) I run into a strange phaenomen - my FQDN hast an '-' interated and the installation process interpreted it as '_'? I mean I have read something about that but couldn´t find that in the doc. anymore. I think it is a big problem for sending mails if the system change my domain name from [email protected] to mail@fq_dn.com ... ;-)
    Is it my fault or is it a "feature"?

    Hi Eisfalke!
    Oracle Collaboration Suite supports multiple domains.
    You will not create users with SQL but with some other commandline tools as their data goes into the OID and the CS database. But yes, it has tools for bulkcreation.
    I have not yet had the pleasure of working with a domain with a - but you should be capable of creating a new domain with a dash and remove the domain with the underscore.
    cu
    Andreas

  • Basic Questions About Compiling Source

    Hi!
    I have some very basic questions about compiling source on 10.6. BTW, if the unix discussions still exist, they've hidden them pretty well, so I hope I'm in the right place for this!
    First off, you simply cd to the source dir, wherever it may be - in my case ~/Downloads/source/  - and during the install process, everything will be installed in its proper dir, right?
    How do you know which compiler to use? There seem to be several: make, gmake, gcc, g++, etc...
    Once you do figure out which compiler to run, the process is supposed to go like this, right?
    ./configure
    make (or whatever)
    make install
    But this doesn't always work for me. For instance, I'm trying to compile 'arm', but it doesn't seem to have a 'configure' script.
    $ ls ~/Downloads/arm
    ChangeLog
    README
    armrc.sample
    setup.py
    LICENSE
    arm
    install
    /src
    Maybe it's that 'setup.py' file? What are you supposed to do?
    Of course, it's not only this one that's given me trouble. Sometimes the readme will say I have to edit a certain file for my system. Are there just a few standard changes you always make? Or is it...how can I put it...complicated? How do you find out what's needed in those cases?
    OS 10.6.8
    Xcode 3.2.4
    Python 2.7

    sudont wrote:
    I have some very basic questions about compiling source on 10.6. BTW, if the unix discussions still exist, they've hidden them pretty well, so I hope I'm in the right place for this!
    This is the place for UNIX discussions. If you have developer-related questions, there is a forum dedicated to that as well: Developer Forums
    First off, you simply cd to the source dir, wherever it may be - in my case ~/Downloads/source/  - and during the install process, everything will be installed in its proper dir, right?
    Yes. Hopefully the project you want to install follows standard conventions. If so, you can do "./configure", then "make", and finally "sudo make install" to install the software into "/usr/local".
    How do you know which compiler to use? There seem to be several: make, gmake, gcc, g++, etc...
    The make file will figure that stuff out.
    Once you do figure out which compiler to run, the process is supposed to go like this, right?
    ./configure
    make (or whatever)
    make install
    Yes, with the addition of "sudo" before "make install" because "/usr/local" is owned by root.
    But this doesn't always work for me. For instance, I'm trying to compile 'arm', but it doesn't seem to have a 'configure' script.
    $ ls ~/Downloads/arm
    ChangeLog
    README
    armrc.sample
    setup.py
    LICENSE
    arm
    install
    /src
    arm? You mean "arm (anonymizing relay monitor) - Terminal status monitor for Tor relays." You really don't want to be messing with that stuff. The only people involved with Tor that are trustworthy are US Navy intelligence who have their own uses for it. If you don't understand it as well as they do, best stay away.

  • Basic questions about macbook pro + external monitor

    Hi,
    I have some very basic questions about using a Macbook Pro + external display. I don't actually have them but need to know how things works.
    So, here they are:
    1) Can I use the external display as the main display?
    2) Will the external display run with its resolution or with that of the mbook pro?
    3) Somewhere I read that you cannot keep the macbook pro open and get the full resolution of the external display. Is that true ?
    4) Is it dangerous to keep the mbook closed while using the external display?
    5) Does the usage of the external display impact on mbook performance?
    I know...a lot of questions , but would be nice if someone could help me.
    Thanks.

    Hi - I am presently using an external display.
    To answer your questions in sequence:
    1. Yes you can use the external display as your main display. The way to enable that mode is to put your MacBook Pro to sleep, attach the external display. Wake up your MBPro with the lid closed and you will see the external display as you main display. You can alternatively set the external to "Mirror" your notebook by using preferences/display.
    2. The external display will run at its resolution although you can adjust and calibrate it using Preferences/Display.
    3. Not true. You get max resolution on both displays. Of course you may have to tweak as mentioned above.
    4. Not at all. I use this mode all the time. Just make sure you initially set up as mentioned above and your LCD on the MBPro will stay off.
    5. I have not seen any performance degradation whatsoever.
    Hope this helps.

  • Basic questions from a new mozaic owner

    I have some very basic questions about how to use the new mozaic 2G mp3 player. I bought the Mozaic because it has a speaker and sleep timer, but I'm finding it to be much harder to use than other mp3 players that I have had (Ipod shuffle, clix etc). This may reflect my failure to look in the right place but I have to say the "help" section isn't much help.
    Here goes:
    . I download podcasts to listen to during my morning run. WMP provides an easy to find place in its program, "recently added," which allows the user to just work with those files. As near as I can tell, Creative makes you wade through all of your tracks. Is there some way to create a file to which "recently added" tracks, or specific tracks, can be dumped? How about automatic tagging of these added files?
    2. I have several thousand pictures on this hard dri've. Apparently, the Mozaic Centrale
    Is going to copy all of them, which strikes me as a waste of space. Is there a way to shut this function off? I couldn't care less if a single photo was added to the centrale program (or whatever it's called). Is it really going to duplicate all of the jpg files?
    3. I have the Zen Stone plus speaker which has served me very well. I had similar problems working with whatever Zen was calling its media player and wound up using WMP instead. I"d like to take a run at using the dedicated Zen media player....
    I apologize for the basic nature of these questions, but the answers weren't obvious to me from the materials I was able to locate.
    gba

    sineadholly wrote:
    Problem with speaker. I read you need to do a firmware update to get the speaker option on your product's menu so i've completely updated it, but still no option to switch speaker on, and won't just come on when i unplug the headphones, any ideas?
    what exactly is the model of your Mozaic? Is it EZ 00, EZ 300 or plane ZEN Mozaic?

Maybe you are looking for