binding

TwoWay binding in SL4 stops working when I add RIA Services to the mix. Solution?

Environment: VS2010, SL4, RIA Services I have an SL4 UI that I developed against data objects that were instantiated from an XML file (so that I didn't have to worry about the back end of the app while I worked on the front end). In this UI, I have a data grid that shows properties for each object in the collection of data. I also ha...

Adding Client SSL certificate to the WCF binding

Is there way to attach client side SSL file (.pfx) file in WCF binding? I don't want to use certificate store. ...

rebind dataGridView

Hello My Project include dataGridView Control, and i change the property: gridview1.columns.DataPropertyName at run time Now, i need rebind my gridView, how i do this. in asp.net is simple gridView1.DataBind(), bun how in c#. Thanks.. ...

problem with binding decimal value in wpf datagrid

Yet another wpf question. I have two DataGridTextColumn's that take decimal values. for some reason when I am adding a new row (the initial value of the columns is zero) I have to enter my value twice in either of these two columns. The first time I type a value in it and tab out, the value returns to zero. After I enter the value the s...

Silverlight 4, SetBinding not working.

I want to bind the contents of a HyperlinkButton to a resource programmatically, it't not working. This is the code I have so far: HyperlinkButton Link1 = new HyperlinkButton(); Link1.Style = Application.Current.Resources["LinkStyle"] as Style; Link1.NavigateUri = new Uri("/Home", UriKind.Relative); Link1...

Implement Binding List In a Control

Hi All, I have a (Image) User Control on a Winform .. I want to bind this Control to a binding list such that whenever the (images) collection changes the (images showing on the ) control also change. (should reflect the images within the collection). [something similar to an AsyncBinding List.] . Similar to how .net controls use Data...

XamlWriter loses binding - ok! but how to keep the value? (ItemsControl)

hi, i know the standard XamlWriter does not persist bindings. but what really stinks is that the current value the binding holds does not get serialized too. my current - really stupid - workaround is to create a DependencyProperty fooProperty and the property foo. and also a property foo2. the Change-eventhandler of foo then writes it...

binding and closures groovy

I dont know how to use binding with closures in grooy.I wrote a test code and while running it, it said, missing method setBinding on the closure passed as parameter. void testMeasurement() { prepareData(someClosure) } def someClosure = { assertEquals("apple", a) } void prepareData(testCase) { def binding = new Binding() ...

Problem using OpenStruct with ERB

EDIT: forgot to include my environment info... Win7x64, RubyInstaller Ruby v1.9.1-p378 EDIT 2: just updated to v1.9.1, patch 429, and still getting this same error. Edit 3: running this same code in Ruby v1.8.7, patch 249, works fine. so it's v1.9.1 that broke it, apparently. I'm new to using ERB and the samples i could find are... um...

WPF Binding ValidationRules in one line?

I have several one-line binding already written and I'd like to keep it that way if possible and if it still is humanly readable. Is there any way to rewrite this <TextBox.Text> <Binding Path="SomePath" NotifyOnValidationError="True" > <Binding.ValidationRules> <local:ValidationRule1></local:ValidationRule1> ...

ASP.NET MVC 2 Model partial binding

Hi, My problem is that I want to partially edit my model - to display 2 fields and to edit another 2 fields for example. When POST happens, returned model contains only the fields that are editable, other fields that I use only to display are NULL. How to fix this, on POST to be returned model with all fields, because on ERROR when I ret...

Control in an ItemTemplate of a ComboBox loses its binding

I have a ComboBox that uses an ItemTemplate as shown below. Somehow the Text property of the text box defined in the item template gets disconnected from the binding and stops being updated when the selected item changes. The ComboBox.ItemsSource is bound to a DependencyProperty that is list of CatheterDefinition objects. The ComboBox...

Binding Doesn't Occur When re-Binding RadioButtons to an Enum

While looking at solutions for tying an enum to a group of RadioButtons, I discovered Sam's post from a year and a half ago. Lars' answer was exactly what I was looking for: simple and effective. Until I started changing the object tied to the RadioButton group. A simple version follows. The XAML: <Window x:Class="RadioEnum.MainWindo...

Problem with passing a vector as a binding to the for macro

I have an arbitrary number of lists which I would like to process using the for macro. I want to create a function that passes a vector as the binding since the number of lists varies. If I hard code the binding, it works as I expect: => (def list1 '("pink" "green")) => (def list2 '("dog" "cat")) => (for [A list1 B list2] (str A "-" B)...

WPF Binding parent property in HierarchicalDataTemplate

Hi! I have a WPF TreeView with 2 levels of data and 2 HierarchicalDataTemplate to format each level. From the HierarchicalDataTemplate at the second level, I need to bind a property in the class of the first level. I have tried in this way, but it dosn't work: Text="{Binding Path=Ori, RelativeSource={RelativeSource TemplatedParent}}" wi...

How do I use Asp.net MVC to validate a list property has a minimum number of items (count=N)?

I have a view model that has a property that looks like this Property SelectedGroups() as List(of string) In the view I have something like this <table> <tr> <th>Description</th> </tr> <tr> <td> <input type="hidden" name="SelectedGroups" value="one" /> description one </td> ...

rebind my dataGridView

Hello My Project include dataGridView Control, and i change the property: gridview1.columns.DataPropertyName at run time Now, i need rebind my gridView, how i do this. in asp.net is simple gridView1.DataBind(), bun how in c#. i try to do this: this.gridview1.DataSource = "MyDataSource" this.gridview1.refresh() and it's not working....

Display a ListBox with a List of enums

Hi. I'm trying to display a ListBox inside of a GridViewColumn that needs to bind to a List of enums (List<ResourceType> Cost). The GridViewColumn's ListView is already bound to a collection of objects and I'm not really sure the best way to go about displaying the ListBox. Any suggestions? ...

JQUERY iFrame, Works with an Alert, doesn't work without an Alert - Strange? Why

The following does not work on my page: $("#bob").ready(function () { $("#bob").contents().find(".findme").css("background", "red"); $(document.getElementById('bob').contentWindow.document).find('.findme').bind("mousedown", function() { alert( $(this).text() ); }); }); But if I add an Alert, which I assume adds s...

Populating properties on my Model with values from a SelectList when I post

I'm building an Asp.net MVC 2 application. I have an entity called Team that is mapped via public properties to two other entities called Gender and Grade. public class Team { public virtual int Id { get; private set; } public virtual string CoachesName { get; set; } public virtual string PrimaryPhone { get; set; } ...