binding

Binding redirects

Where is the best place to find information on binding redirects? or maybe just a basic explanation of where you put these redirects within a project? ...

ValidatesOnExceptions fires but it doesn't show the exception message

Hello, I have a TextBox.TextProperty bound to a ViewModel property. In the binding I have explicitly set ValidatesOnExceptions to True. In resources the TextBox has this trigger: <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(...

Why does XAML element-to-xml binding only partially work?

In the below code, the ListBox gets filled with the names of the colors from the XML file, but those names strangely do not appear in the TextBox. However, if you bind the textbox to the static "lbColor2", those names do appear. So what could be different about the names when they come from the XML source which makes them not get passe...

How to bind a string list to a datagrid?

it looks pretty easy and there must be a way to do it: i have a simple List and i would like it to be displayed in a column in dataGrid. if these were some more complex objects i would know how to set the displayed texts in the columns but i want to display just strings and if i set the list as a datagrid's data source myDataGrid.DataSou...

WPF binding to My.Settings for radiobuttons (using vb.net)

Following the advice at http://stackoverflow.com/questions/204779/wpf-binding-my-settings-collection-to-combobox-items I was able to get binding working for checkboxes but not for radiobuttons? After saving MySettings the checkbox value is either true or false depending on if the checkbox is checked or not (as expected), while the rad...

C# early and late binding

I'm trying to get my head around when early/late binding occurs in C#. Non-virtual methods are always early bound. Virtual methods are always late bound: the compiler inserts extra code to resolve the actual method to bind to at execution time and checks for type safety. So subtype polymorphism uses late binding. Calling methods using...

How can I divide a bound array in parts that automatically fill the table?

I used this 'tutorial' to bind my array called 'collection' to a NSTableview on my interface: http://www.cocoadev.com/index.pl?NSArrayController The interfacebuilder stuff isn't that hard. It becomes difficult when I try to actually show the data in my array into the view. in my .h file: @interface MyDocument : NSDocument { NSMuta...

C#: How to call a method while forcing different marshalling?

A method declared in one of Microsoft's Primary Interop assemblies is wrong. It is declared as: void Write(object[] psarray); which is incorrect, and should actually be declared as: void Write([In, MarshalAs(UnmanagedType.SafeArray)] object[] psarray); I need to force the compiler to use [In, MarshalAs(UnmanagedType.SafeArray)], w...

.NET Assembly Binding How/Why (1.1, 2.0, GAC, Policy Files and more...)

I have been working through a number of very "odd" issues with some DLL versions, Policy Files, and items in the GAC and for the life of me I haven't been able to find a solid answer as to how/why the .NET framework picks the assemblies that it does, when binding project references. First of all to give a bit of history about what we ...

Bind user defaults to different identifier

I have a preference pane bundle (it runs in the System Preferences). I designed the interface using Interface Builder where I binded a "start automatically" checkbox to the Shared User Defaults. This works great but it writes the preference to com.apple.systempreferences. I would like to keep my preferences in the com.example.mybundle de...

Java - Handle multiple events with one function?

First of all, I am a complete Java NOOB. I want to handle multiple button presses with one function, and do certain things depending on which button was clicked. I am using Netbeans, and I added an event with a binding function. That function is sent an ActionEvent by default. How do I get the object that was clicked in order to trigge...

How to bind nested objects, or master-detail-binding, in code?

I have a three nested classes, Show, Season and Episode, where a show has seasons, and seasons has episodes. I want to bind two listboxes so that the first lists seasons, and the second lists episodes in that season. How can I do this? I prefer to set this up in code, not xaml, but if you know how to do it with xaml, it's better than ...

JGoodies Binding vs. JSR 295

Hello, What is the practical difference between JGoodies Binding and JSR 295, Beans Binding? They both seem to be intended for the same purpose and get their job done (with slightly different approaches). JGoodies Binding is more mature, but JSR 295 is eventually getting part of JDK in Java 7. Using a standard part of JDK is surely pre...

GridView FindControl returns null when HeaderText is set

I have a GridView... <asp:GridView EnableViewState="true" ID="grdResults" runat="server" CssClass="resultsGrid" OnRowDataBound="grdResults_OnRowDataBound" AutoGenerateColumns="false" HeaderStyle-CssClass="header" OnRo...

Is there SQL parameter binding for arrays?

Is there a standard way to bind arrays (of scalars) in a SQL query? I want to bind into an IN clause, like so: SELECT * FROM junk WHERE junk.id IN (?); I happen to be using Perl::DBI which coerces parameters to scalars, so I end up with useless queries like: SELECT * FROM junk WHERE junk.id IN ('ARRAY(0xdeadbeef)'); Clarification: ...

Binding a list of integers in an IN clause using Cayenne

I'm trying to bind a list of integers into an SQLTemplate IN clause like so: SELECT * FROM table1 WHERE id IN ( #bind($idList) ); I have a string of ids: idList = "1, 2, 3, 4"; I can't get the bind to work successfully, it returns no values when I pass in the string as a list of ids to check. I'm having to use string concatenation...

How do I make Binding respect DependencyProperty value coercion?

I have a control with a DependencyProperty with a CoerceValueCallback. This property is bound to a property on a model object. When setting the control property to a value that causes coercion the Binding pushes the uncoerced value to the model object. The property value on the control is coerced correctly. How do I get the Binding to ...

C# Issue: How do I save changes made in a DataGridView back to the DataTable used?

I get a DataTable from a DataSet and then bind that DataTable to a DataGridView. Once the user edits the information on the DataGridView how do I take those changes and put them back into a DataTable that was used that I can then put back into my DataSet? I want to make a Save Button on my DataGrid that when pressed actually saves the c...

Advanced ruby question: binding of procs

Hi All, Is it possible to execute a proc within the context of another object? I know that normally you'd do proc.call(foo), and then the block should define a parameter. I was wondering though whether I could get "self" to bind to foo so that it's not necessary to have a block parameter. proc = Proc.new { self.hello } class Foo de...

Binding Datetime types on Listview (WPF)

Hi there im using C# 3.5, this could be possible ? <EditItemTemplate> <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("date", "{dd/MM/YYYY}") %>'></asp:TextBox></EditItemTemplate> <ItemTemplate> I was trying : <ListView Margin="0,80,0,38" Name="dls...