binding

DateTime binding default error message using Linq to SQL

Hi, i'm using Linq to SQL for my model with a custom validation layer. I cannot find the way to edit or change the default message: The value '29/34/1980' is not valid for BirthDate. BirthDate is of course my textbox. Any ideas? Thanks EDIT: this is the simple code i'm using: <%= Html.Label("Data di Nascita (GG/MM/AAAA)", "BirthD...

Model binding and display trimmed string property

My strongly typed View inherits from a "Person" object that is created with Linq to SQL. In my "Edit" View, i have to display of course old values: <%= Html.TextBox("FirstName") %> "FirstName" is NCHAR, so it need to be trimmed. So i ended up with: <%= Html.TextBox("FirstName", Model.FirstName.Trim()) %> and this works. But when fo...

sqlite_bind_?(character) how to bind characters in sqlite?

Hi all, May be its a silly question but I am a bit confused in it, I want to bind a character into sqlite database (neither as varchar, nor as text but as character only) Hence we can not use sqlite3_bind_text(insertStmt, 1, @"A", -1, SQLITE_TRANSIENT); So should I use sqlite_bind_int(insertStmt,1,65); or there is a better way t...

Dictionary to ListView TwoWay binding - possible?

I'm attempting to bind a Dictionary to a ListView who's item template constist of a grid with 2 textboxes. Ideally I'd like to be able to modify both the key and the value of the KeyValuePair displayed in the ListView . Is that possible? ...

WPF Combobox behavior weird

Hi guys, I have 2 comboboxes which we will call cbo1 and cbo2. Now, there is a relationship between cbo1 and cbo2. when i select an item at cbo1, the cbo2 ItemsSource is updated (since it is bound to the SelectedItem) anyway, below is the sample XAML code for it. <ComboBox x:Name="cbo1" Grid.Row="0" Grid.Column="1" Margin="5" SelectedIt...

How to bind in PDO a string with %

I have the following query, (which don't work). How do I bid strings inside an existing string with % (I believe the % is not the problem, but really not sure). $sql="SELECT * FROM T WHERE f LIKE '%:bindParamString%'"; ...

WPF Data Binding - Bind to UI Control from a Template

I have a template in my section. I want to bind the Width of one of the values in that template to the width of a control in my Main XAML section. Can this be done? Expression Blend only shows the Template in the Binding list. For example, this is what I am wanting to have work: <Windows.Resources> ... My template stuff <Grid.Co...

add custom function to YUI tabview

I've come up with the following function to fill a need: function getTabFromElementID(elementID){ //get all of the tabs from the tabViewObject var tabArray = this.get('tabs'); var foundTabObject = nil; tabArray.each(function(tabObject, index){ if(tabObject.get('element').id == elementID){ foundTabObject = tabObject ...

How To Bind ListBoxItems to two ObservableCollection

Hello, everybody. My problem takes above one month of my time. Sorry for my English. I hope that i can explain the problem. I have a trouble while Binding ListView Control to two ObservableCollection. It's must be a simple thing, but I can't resolve it. My ListView has a Template like: <ListView Name="lstClients" DataContext="myObsColl...

How to bind SQL variables in Php?

How to bind SQL variables in Php? I want to bind variables instead of just building SQL strings. Anyway to do this in Php? either MySQL or PostgreSQL answers would help. Thanks ...

Unbind gridview in jquery

Is it possible to do the above? i.e. I have a gridview that binds to a data set. Currently I have a ddl that when a client clicks on it, the gridview 'disappears'. (i.e. $('#GridView1').remove();) However this does not remove the bind and therefore when a postback occurs, the gridview is populated with the 'erased' dataset. Can I use...

Specifying and displaying columns of a DataGrid in WPF declaratively using a binding?

Is there a way to specify DataGrid columns declaratively using a binding? (And to set the columns' properties using this binding?) Idealy, I would have a list of objects (e.g. rows) databound to the ItemsSource and one of their properties would be a dictionary (or a list of objects of a certain class or whatever) with a name and a value....

Using ItemsControl on a multi-leveled TreeView

My co-worker threatened to put me on TheDailyWTF today because of my property I wrote to be used to build a 3-tiered treeview with ItemsControl. I bear you the footprint: ObservableCollection<KeyValuePair<string, ObservableCollection<KeyValuePair<string, ObservableCollection<MyType>>>>>; My goal was to create an ItemsControl that wou...

Behaviour for binding - help needed

I have a requirement to create a behavior in blend 3.0 for binding. Following are the use cases User will drag and drop the binding behavior to any control. He will select the properties and data sources which they want to bind through property dialog of binding behavior. When the program executed the custom class created for bindin...

Simplify AS3 binding/event-dispatching code

There are 3 properties (example 1): [Bindable] public var name:String; [Bindable] public var email:Number; [Bindable] public var address:Boolean; I needed to have 3 helper methods that will be bindable too (example 2): [Bindable] public var name:String; [Bindable] public var email:Number; [Bindable] public var address:Boolean; publi...

How to bind XmlDataProvider.Source to MVVM property

I've got a treeview bound to an XmlDataProvider following this example. The app I am working on is following the MVVM pattern and the Xml is from a file that the user will open. When I try to bind the Source property of the XmlDataProvider like so <XmlDataProvider Source="{Binding Path=XmlFilePath}"/> I get a "Binding can only be app...

Need help with TabControl.ItemTemplate

Hello. How do I set the TabItem.Header to bindings taken from few fields, each binding shown in a different size, all in the place of the original header text; without overriding the default style and behavior of the header - I only need the text. I tried to set its template but then it creates a rectangle that contains the inner contr...

Binding values not showing up in ListBox (silverlight 3)

I am loading values for a listbox from an xml file. What my problem is i can't get the bindings show the property values of the class that each item is assigned. When i set the Text this way: <TextBlock Text="{Binding }" Style="{StaticResource TitleBlock}"></TextBlock> The items show the toString value of the class, but if i use: <T...

WPF CheckBox Binding - Altering value in Property Set does not affect UI

Hello! i have a simple checkbox <CheckBox IsChecked="{Binding ForceInheritance}"/> In Code i have a class with "INotifyPropertyChanged" and the Property public bool ForceInheritance { get { return forceInheritance; } set { if (forceInheritance != value) { value = SomeTest(); if (forceInheritance != value)...

There is any WCF binding that accepts the data in a HTTP query string?

There is any WCF binding that accepts the data in a HTTP query string? ...