Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

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

 
 
Old 01-10-2006   #1 (permalink)
Jason Dolinger


 
 

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


 
 

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


 
 

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
 

Thread Tools


Similar Threads
Thread Forum
Create a path string VB Script
Extract folder from dir path (String) PowerShell
How do I escape the wildcard character in a path string? PowerShell
BUG? (Test-Path $path -IsValid) and empty $path PowerShell


Vista Forums 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 Ltd

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