binding

How to catch exit() in embedded C++ module from python code ?

Hello, I am embedding a c++ library (binding done with SIP) in my python application. Under certain circonstances (error cases), this library uses exit(), which causes my entire application to exit. Is there a way to catch this event, or do I need to modify the library to handle error cases differently ? Thank you very much, ...

WPF UserControl in DataTemplate within ItemsControl - how to bind to parent of ItemsSource

The subject line says it all really! I have a user control which can be bound successfully to, say, a Fullname object - i.e. it works ok. I now need to show a list of these and, again, this works ok when the control is in a DataTemplate within ItemsControl.Template. But, the control has a property (InEditMode) that is not a property ...

Treeview - Hierarchical Data Template - Binding does not update on source change?

Greetings! I ran into this problem in my project (Silverlight 3 with C#): I have a TreeView which is data bound to, well, a tree. This TreeView has a HierarchicalDataTamplate in a resource dictionary, that defines various controls. Now I want to hide (Visibility.Collapse) some items depending on wether a node has children or not. Other...

Help: MySQL adapter.fill(dataset) Error

I'm connecting to a MySQL database using the MySqlClient class. When I try to fill a fill a Data List with the Data Set I get an error: #42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax Heres the code I have in VB.net to fill the data list. Dim strConn A...

jQuery : binding keydown, same behavior except for one

Hello, I have some input (text type). I'd like to the same behavior for all except for one. I tried this : $(document).ready(function() { $("input[type=text]").bind('keydown', function(e) { .... }); $("#MyOtherInput").keydown(function(e) { ..... }); }); MyOtherInput is the input type texte with a specifi...

Binding JQuery events

Hi all. JQuery events are annoying me. The thing is that I very often use javascript (after ajax requests, etc.) to draw up new elements (buttons, divs, etc.). I've got a list of elements which you can press on an edit button so you can manipulate the one linked to the selected edit button. Now if someone submits a form to make a n...

Problem with conditional databinding

hi guyz. i ve been strugling to find some way to do my required conditional binding, but i am lost :s i want to use Eval("products_image") in conditional binding in such a way that if product_image exists in images directory then its ok, otherwise it should display "noimage.jpg" i tried to do it this way: <%# (File.Exists(("ProductI...

WPF PropertyChange does not cascade - animating one custom class dependencyproperty changes other properties - PropertyChange only fires for first

Hi all! Very simplified, this is my problem: (solution in the bottom) I have a custom class, inheriting Animatable and INotifyPropertyChange, containing one DependencyProperty (which I animate, say from 1 to 10) and one extra property (which I want to use from the XAML with a binding): MyClass : Animatable, INotifyPropertyChanged { ...

referencing an uncompiled c# class

This might be a strange question. I need to late bind an uncompiled c# class (.cs). Not even sure if this is possible. The class won't be part of the project or referenced. The only thing I'll know about it is its file location. The file wont be compiled at execution time as it will be part of a website app_code. Simply just trying to ...

WPF Data Bound Control, Detect SQL Table change

Im having a moment of stupidness. I have a Treeview control in WPF, that is displaying a list of Quotes, ie Quote#, Quote Name eg "Q#1000" "Server Quote" This treeview is bound to a collection of objects public ObservableCollection quoteitems = new ObservableCollection(); Which are loaded from a SQL database via an SQLDataReader whic...

WPF Simple Binding to an objects property

Hi, Im having some problems with binding in wpf/xaml. Have this simple file: <Window x:Class="test.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Grid> <TextBlock Height="21" Foreground="B...

how to change the visual state of a WPF control based on evaluation of other Visual Elements?

I want to do the following: <TextBlock Text="{Binding Result}"> I want to Color this based on an equality check on Result, what's the view centric way to do this? I remember reading about template selector, is that the right choice here? example: Text="Pass" Color="Green" Text="Fail" Color="Red" I'd like this to be dynamic so t...

Is there a way of passing all the defined variables to a GroovyShell?

Right now, when I'm trying to eval a piece of code in Groovy, I have to do something like this : new GroovyShell(new Binding([var1:var1])).evaluate(line) This can be pretty nasty when you have a lot of variables defined. Is there a better way of doing this? Is there something like Python's locals, or something similar that lists all t...

flex3:How to override function set label of a button

Hi, Flex 3 question: I trying here to avoid having to bind resources to all my components labels ( ie a button) and find a way to have this automated. Problem: It corrupts the layout in design mode to bind directly in the mxml label="{resourceManager.getString('myResources', 'submit')}" and makes the design view useless. but when dec...

wpf error template - red box still visible on collapse of an expander

Hi, I'm doing some validation on the DataSource of TextBox that's within an Expander and have found that once a validation error has been triggered, if I collapse the Expander, the red box stays where the TextBox would have been. <Expander Header="Blah Blah Blah"> <TextBox Name="TextBox" Validation.ErrorTemplate="{DynamicR...

binding asp.net mvc form element to complex object for posting to controller

I am trying to refactor to avoid parsing the FormCollection from the view so i changed this to pass in an strongly typed object. My form elements are the same names as the properties on the LinkUpdater Object. But when i put a breakpoint on the first link in the controller all of the properties are null. any ideas or suggestions? Vie...

C# WPF Getting localized FontFamily

The project I am working on has a rich text box that can have it's font changed to any of the system fonts via a combo box. We add all the FontFamily objects from "Fonts.SystemFontFamilies" as the ItemsSource of the combo box. We need to be able to show the localized names of these fonts if they exist within each FontFamily. I'm curre...

WPF IDataErrorInfo and NHibernate Validation - how to trigger a Validate?

Hi, I recently plugged the NHibernate validation into my app, I've decorated the properties of my domain objects with the NHibernate attributes as so ... [NotEmpty, Length(Min = 1, Max = 40)] public string Description { get; set; } I've also implemented IDataErrorInfo on my Domain Object ... public string this[string co...

Asp.net MVC Binding an object with properties which are collections of objects which also have child collection properties

Hi, I'm trying to retreive data from a massive form using Asp.net MVC. Its top object L1 contains properties which are Collections of other types L2. However the Type L2 contains some properties which collections of type L3, and so on. There are probably 5 levels of nested collections. I've seen the approach of binding to Lists in Asp....

get object out of telerik radcontrol for winforms binding

Hello, I hope that someone can help me with an issue related to binding a bindable collection class to one of the Winforms Telerik list controls. If you bind to a plain ole windows list control like this... dim list as new listBox with list .DataSource=myCollectionClass 'this contains a collection of widgets. .ValueMember=...