![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| 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. |
| |||||||
| |
| | #1 (permalink) |
| | 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 Specs![]() |
| | #2 (permalink) |
| | 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 Specs![]() |
| | #3 (permalink) |
| | 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 Specs![]() |
| 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 | |||