Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Binding(string path) - what is the syntax for the path?

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 01-10-2006   #1 (permalink)
Jason Dolinger
Guest


 

Binding(string path) - what is the syntax for the path?

Hi all,

Continuing in my quest to build a custom control for a databound grid in
WPF, I'm at the point where I'm trying to get each cell to recognize
which piece of data in the DataTable it is bound to. Using the code
that had come in the WinFX SDK DataGrid as an example, it looks
something like this:

Binding b = new Binding(".[" + rowCount + "][" + columnCount + "]");
b.Mode = BindingMode.TwoWay;
b.Source = this.DataView;
tb.SetBinding(FrameworkElement.DataContextProperty, b);

tb here is a TextBox representing that individual cell. Is the syntax
of the string being passed to the binding constructor correct here? I
ask because it doesn't seem to work. When connecting my grid to a
DataView object containing a DataTable, nothing appears in the TextBoxes
on display.

Thanks,
Jason

My System SpecsSystem Spec
Old 01-10-2006   #2 (permalink)
Florian Kruesch
Guest


 

Re: Binding(string path) - what is the syntax for the path?

Jason Dolinger wrote:
> ...
> which piece of data in the DataTable it is bound to. Using the code
> that had come in the WinFX SDK DataGrid as an example...


Jason, can you point me on where to find this??

thanks
Florian
My System SpecsSystem Spec
Old 01-10-2006   #3 (permalink)
Jason Dolinger
Guest


 

Re: Binding(string path) - what is the syntax for the path?

Florian Kruesch wrote:
> Jason Dolinger wrote:
>
>> ...
>> which piece of data in the DataTable it is bound to. Using the code
>> that had come in the WinFX SDK DataGrid as an example...

>
>
> Jason, can you point me on where to find this??
>
> thanks
> Florian


Hi Florian,

This originally came as part of the WinFX SDK, which I'd never had.
It's still buried in with the samples that came with the November CTP of
WinFX. To access these, bring up the Windows SDK documentation (From
your Start menu, "Microsoft Windows SDK" -> "Windows SDK Documentation."
Then in the documentation browser, drill down the following path: WinFX
Development -> Samples -> Windows Presentation Foundation Samples ->
Application Samples -> Data Grid Demo.

Now, I've got to warn you, this sample in no way compiles or runs on the
November CTP, it's a big mess. I've got a previous thread in this group
("DataGrid sample in WinFX SDK" started on 12/5/2005, where Tina Tam
mentions that the grid is quite broken and they've removed it from any
online WinFX documentation (which was my first frustration). So I'm
just using it as a model to implement my own grid.

Good luck!
Jason
My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract folder from dir path (String) Gregor PowerShell 1 05-17-2008 06:09 AM
How do I escape the wildcard character in a path string? Chuck Heatherly PowerShell 1 04-30-2007 08:11 AM
BUG? (Test-Path $path -IsValid) and empty $path =?Utf-8?B?Um9tYW4gS3V6bWlu?= PowerShell 1 08-28-2006 12:10 PM
BUG/ANNOYANCE: PoSH autocompletes the full path rather than a minimal path Adam Milazzo [MSFT] PowerShell 2 08-12-2006 03:14 AM
Data Binding Path Resolver Weifen Luo Avalon 0 05-08-2006 06:19 AM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51