|
-
Oct 9th, 2010, 09:41 AM
#1
Thread Starter
Hyperactive Member
[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.
-
Oct 9th, 2010, 10:35 AM
#2
Thread Starter
Hyperactive Member
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.
-
Oct 11th, 2010, 01:38 PM
#3
Re: xaml binding path with forward slash or space in field name
Thy this:
Code:
<object Text="{}Province/State"/>
-
Oct 12th, 2010, 07:00 AM
#4
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|