binding

Linq to SQL Compact - Update binding

When I set the ItemsSource of a ListBox to the contents of a table, like this: this.listBox.ItemsSource = db.Table; The items are not updated automatically in the ListBox. How can I manage to update the ListBox automatically when items are added, removed or changed? And can I also receive an event when the collection has changed? ...

It is possible to bind a whole class in spring?

I use spring web flow 2 with hibernate annotations. I have a question that may sound stupid but I have to ask it: is there possible that in my jsp using form tags to bind a whole class? I am asking this, because when I generated my entity classes from SQL Server 2008 using Intellij it autogenerated also my @ManyToOne column (it's about 2...

WPF Binding - There must be a better way than how I'm doing it!

Overview I am using CompositeWPF to create an app using C#. This really should make a difference to the answer as my problem would exist outside of Prism. I have an ItemsControl which is bound to an ObservableCollection containing my ViewModels. This is working fine. In my DataTemplate I have my required controls bound in XAML. One...

XPath syntax within binding XAML

What is the syntax for using XPath with Binding in XAML? Are there any MSDN pages which describe where to put the braces? Visual Studio doesn't like the following: <TextBlock Text="{Binding XPath=/One/Two[@id='0']/Three/@Four}" /> I want the Text of the TextBlock to be set to the value of the Four attribute. ...

How to pass an empty string as a ConverterPararmeter?

Hello I have a Binding that I am using along with a converter, I want the parameter that is transferred to the converter should be an empty string. Is there a way I can pass it via an inline binding? ...

Jquery binding event with Map Hilight plugin

I'm trying to use the Hilight plugin for an image map rollover. You can see it here: http://www.quiznosforsale.com/test/ I want to stop the rollover effect when someone clicks on a state - allowing the user to click on information on the right side w/ out having the map switch to a different state. How might I bind this event and the...

How do I bind the Overlay Tool for new Ajax elements in Jquery?

Hi, I'm using: echo $javascript->link('tools.overlay-1.0.4', false); which is initialized with: $(".overlay_popup").overlay({ expose: '#000000', close: '.close_overlay', finish: { top: 'center', left: 'center', absolute: false } }); I call the overlay popup box like this: echo $html->link( ...

Bind Image.Source according to Boolean without a converter?

Hi I want to have an image bound to a boolean and have the source of the image to depend on the boolean value i.e. true source="image1" false source="image2" I was wondering if there is a way to do it inline without need for a converter. ...

WPF - Binding to CheckBox not working in a HierarchicalDataTemplate

In a WPF treeview I am trying to automatically check the children if the parent node is being checked. I am using a view model for that and a bindable object for the nodes, however all my attempts failed. Here is the code (C# + XAML). Any ideas would be greatly appreciated <Window x:Class="TestCheckBoxBinding.Window1" xmlns="http://sche...

Using Mode=TwoWay and AutogenerateColumns=True in Silverlight 3 DataGrid

My List<BusinessObject> has some public properties that I want to bind to columns in a DataGrid. Unfortunately, the names of the public properties are not good and I may not even know what they are until runtime. For this reason, I set AutoGenerateColumns=True and interecept each DataGridAutoGeneratingColumnEvent so I can inspect what it...

How can you bind an Indexed property to a control in WPF

Given an instance of the class ThisClassShouldBeTheDataContext as the Datacontext for the view class ThisClassShouldBeTheDataContext { public Contacts Contacts {get;set;} } class Contacts { public IEnumerable<Person> Persons {get;set;} public Person this[string Name] { get { var p = from i in Persons where i.Name...

How Do I hook Binding.NotifyOnTargetUpdated to a DataGrid programatically

Basically, I want the XAML done in C# ItemsSource="{Binding Computers, NotifyOnTargetUpdated=True}" ... thanks, CG ...

WPF Commands Buttons ListBoxItems

Hi, I Have a listbox defined like below : <ListBox x:Name="lstMedias" ItemsSource="{Binding Medias}" Width="Auto" Height="Auto"> <ListBox.ItemTemplate> <DataTemplate> <Button Content="{Binding Name}" Tag="{Binding Name}" Click="Button_Click" Command="{Binding Path=LoadSimpleMoviePopupCommand}"> <...

DataGridView rows show up but no data

I am trying to bind a collection (that inherits from BindingList) to a DataGridView. The grid headers show up fine and the I get the number of rows that I expect. However, the cells are empty. Has anyone else had this problem? If so, how did you resolve it? I've talked to someone else who had the same problem but they can't remember ...

how to get filter the data table

hi. i have datatable with which contains all theses columns columns as ID, NAME,PATH i am binding the datatable to ID, Name in dropdown control. once the user selects a value of "name" in the dropdown . i'll get the ID of it . basesd on that then i need to get the corresponding path value in a string ...

Strange behaviour of Listboxes in WPF

I have a window with two listboxes both bound to an XMLDataProvider. The SelectedItem property of Listbox1 is two-way-bound to the SelectedItem property of ListBox2. So far so good. ListBox2 contains a Styletrigger which sets IsSelected to true when the mouse hovers over an item. The corresponding item in ListBox1 is selected too becaus...

WPF GUI Manage using Thread.CurrentPrincipal

Hi I found this questions http://stackoverflow.com/questions/1019204/how-to-manipulate-wpf-gui-based-on-user-roles/1020303#1020303 and apply his answer to my project. I'm implementing the same behavior. but the thing is the property binding doesn't work. I create the RoleToVisibilityConverter class and make some test, calling the co...

WPF: Binding directly to a control

I need to bind a property of a UserControl directly to another control, rather than any specific property on that control. What's the best way to achieve this? I've tried various combinations of the Binding properties to no avail. For some context, the UserControl has a Next property that specifies which control is next in the navigatio...

How does one detect SetBinding sucess or failure in Silverlight?

Simple binding from C#: Binding binding = new Binding(SourceName); binding.Mode = BindingMode.TwoWay; BindingExpressionBase beb = SetBinding(SourceDependencyProperty, binding); I would like to detect whether or not the SetBinding was successful. SetBinding obviously knows when it has an issue because it displays in the Output w...

i want to bind the gridview in asp.net 2008

i have more than 10,000 record .. and i want to bind my database which is in sql server 2005,with gridview in asp.net ... main purpose is .. without taking so much load ... it;s loading in gridview.. while i will run it.. ...