binding

How to bind a nested control from main page code behind

Hi, I have the following structure in place and need to rebind the lower control (DropDownList) from the code behind of the MainPage. x MainPage1 x---- Panel1 (modal popup) x--------- UpdatePanel (upMailOrStatusAction, on Panel1) x-------------- RadioButtonList (rblActionLevel, on UpdatePanel) x-------------- SubForm1 (on Panel1) x---...

Bind Web Browser to Specified Network Interface

I have a situation where the web browser needs to bind to a specified network interface if more than one network connection exists. Is there a way to programmatically specify which network interface the web browser should bind to? ...

jQuery Dynamic Binding not working IE 7 or 8

I'm working on a selection drop down list. this list adds all the selected elements (done by a user) into a container < DIV > in the form of hidden fields. This selections have a link that gives the user the option to remove it from the selection container. Every time a new selection is made, the code automatically binds a function that ...

Returning a c++ array (pointer) from boost python

I'm currently writing python bindings for a c++ library I'm working on. The library reads some binary file format and reading speed is very important. While optimizing the library for speed, I noticed that std::vector (used in the instances I'm reading) was eating up a lot of processing time, so I replaced those with simple arrays alloca...

Wpf Binding filteration

Hi , I have a doubt binding a textbox.he scenario is like this.I hava a dataset say, DataTable dt=new DataTable(); dt.TableName = "table"; dt.Columns.Add("mode", typeof(int)); dt.Columns.Add("value", typeof(int)); DataRow dr = dt.NewRow(); dr["mode"] = 1; dr["value"] = 1000; dt.Rows.Add(dr); dr = dt.NewRow(); dr["mode"] = 2; dr["value"]...

Binding Component <-> Container (Enabled property)

Hi everyone, I'm just trying to work out the best way to replicate a pretty useful feature of Windows' Forms.Panel in Java. Basically, when you disable a Windows Forms.Panel, all child control's are set to disabled too. However, their enabled property is preserved such that, when the the Panel is enabled again, any child control that wa...

WPF: Simple Binding Q: binding visibility to control in different class

Hello, In my main window xaml I have two user controls and two radiobuttons. I want the radiobuttons to control the visibility of the user controls. xaml excerpt: <WpfApp2:ViewTree/> <WpfApp2:ViewTab/> <RadioButton x:Name="radioButton_Tree" GroupName="View" IsChecked="True"> Tree View </RadioButton> ...

Local functions in Python

In the following Python code, I get an UnboundLocalError. As I understand it, local functions share the local variables of the containing function, but this hardly seems to be the case here. I recognise that a is an immutable value in this context, but that should not be a problem. def outer(): a = 0 def inner(): a += 1 ...

SelectedValue not binding for some of the Html.dropdownlist in asp.net mvc???

I got 3 html.dropdownlists out of which only for 1 its the setting the selectedvalue.How come its binding for one of the dropdownlist not for the other 2.In the Quick Watch,all the values are proper, it even shows which value has its selected=true. but in the page it doesnt get set. Is there any solution for this? Function Index(ByVal c...

How to use bind1st and bind2nd ?

Hi, I would like to learn how to use binding functions. Here is the idea: I have this function which takes to parameters: void print_i(int t, std::string separator) { std::cout << t << separator; } And I would like to do: std::vector<int> elements; // ... for_each(elements.begin(), elements.end(), std::bind2nd(print_i, '\n')...

How to keep bound JTable up to date?

I am using a bound JTable to display a list of entities. // selSteps is a List of entities. selStepsBound = ObservableCollections.observableList(selSteps); JTableBinding jTableBinding = SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, selStepsBound, tblSelSteps, "tblSelStep...

What Are Binding Generators For?

A friend raised this on Twitter: @name_removed doesn't understand why binding generators seem to think writing pages of XML is vastly superior to writing pages of C++... Having never encountered binding generators before, I decided to look them up. Seems pretty self-explanatory, convert C++ classes to XML format. But now I need someone ...

[newbie question] WPF binding to GetTranslation(string key) method for localization

Hi, I'm a beginner in WPF and currently working on my first app. For this project I'm supposed to use this method to add localization in the app: [TranslationService.cs] public class TranslationService { string language; public TranslationService(string language) { this.language = language; ...

propertybinding with reflectiontypes

In my project i'm creating new Typeobject (using Reflection) So i have object of type {TempType41459726} (for example) How can i add DataBinding to the properties of these object? Binding binding = new Binding("propertyname"); binding.Source = this.Action; binding.Mode = BindingMode.TwoWay; element.SetBinding(e...

Binding to a read-only getter in AS3

Consider the following code: [Bindable(event="ReportHeaderVO_effectiveFromDateJulian_updated")] public function set effectiveFromDateJulian ( value:Number ) : void { _effectiveFromDateJulian = value; dispatchEvent( new FlexEvent("ReportHeaderVO_effectiveFromDateJulian_updated") ); } public function get effectiveFromDateJulian (...

WPF Mixing Bound and Fixed text in a TextBox

I have the following code to display a clients age. <TextBox x:Name="txtClientAge" Text="{Binding Path=ClientAge}" /> However, instead of just displaying just the number, I want to prefix it with the text "Age " and suffix it with the text " yrs" so it is effectively becomes "Age 36 yrs" I can achieve this with a horizontal StackPane...

Binding an NSColorWell to an NSTextField

I'm attempting to bind an NSColorWell to the NSTextField value and implementing an NSFormatter subclass. The NSColorWell is bound to an ivar in the app delegate which is also bound to the NSTextField. There is an NSFormatter that converts the [NSColorWell color] to a descriptive string. When the UI focus is on the NSTextField, it does...

WPF - MVVM Command binding on Sub ViewModel

Hi, I've got a VehicleViewModel that has a sub ViewModel of NotesViewModel public IManageVehicleNotesViewModel NotesViewModel { get; set; } On the first activation of VehicleViewModel I activate the sub ViewModel. NotesViewModel.Activate(); The activation calls a method to init a number of Commands, I've break pointed this and its...

Lua bindings: table vs userdata

When making Lua bindings for C++ classes, should I return tables or userdata objects? Does anyone know any of the pros and cons for each method? ...

WPF textbox that only updates binding when enter is pressed

Hi, all. I have a usercontrol "NumericTextBox" that only allows numeric entries. I need to exhibit another specialized behaviour, that is, I need it to be able to bind it to a VM value OneWayToSource and only have the VM value update when I press enter while focusing the textbox. I already have the an EnterPressed event that fires whe...