Results 1 to 4 of 4

Thread: [RESOLVED] xaml binding path with forward slash or space in field name

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Location
    Burlington, ON, Canada
    Posts
    343

    Resolved [RESOLVED] xaml binding path with forward slash or space in field name

    Hi all,

    I have a table that contains fields with forward slashes and spaces in the names. when i do drag and drop databinding in a wpf window, any fields without special characters bind just fine, but the spaces and slashes don't display. I've tried enclosing the fields in single quotes '' and in square brackets [] and multiple combinations of the two without success - the minute i enclose in square brackets, all data vanishes from the form, not just the weird field names.

    obviously a fix is to rename the field names to not contain those characters - however, this will have repercussions on the production environment that this wpf app will be replacing so if possible, escape sequences and/or syntax for xaml would be highly appreciated if anybody has encountered this before.

    The field names in question are 'Province/State' and 'Zip/Postal Code' (without the single quotes of course)

    They are bound to standard textboxes on a wpf window

    thx
    Last edited by trevorjeaton; Oct 9th, 2010 at 10:18 AM.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Location
    Burlington, ON, Canada
    Posts
    343

    Re: xaml binding path with forward slash or space in field name

    here's some more info - after looking back through the xaml at other fields, the ones with spaces in the name are fine - its only the forward slash that is causing the problem.....still researching though and will post results as i find them.

  3. #3
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: xaml binding path with forward slash or space in field name

    Thy this:
    Code:
    <object Text="{}Province/State"/>
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Location
    Burlington, ON, Canada
    Posts
    343

    Re: xaml binding path with forward slash or space in field name

    I actually wound up going the CLS compliant route and modified the database over two grueling days this weekend and all the code that went with it to remove any spaces from table names or their corresponding field names - not fun......but in the same breath, no more square braces in my code lol :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width