databinding

How can i bind a triplet to a dropdownlist

Hi, i have a list(of triplet) and want to bind this to a dropdownlist. Is this possible without using codebehind? I already tried to DataValueField="First" DataTextField="First" added an extention to the triplet with a function but none worked. any ideas? ...

Create and bind a GUI from xsd file automatically in eclipse rcp app

I want to create GUI components from XSD files. The generated GUIs should be used for concrete xml instances of the corresponding schema with databinding to "interesting" elements or attributes content. I have considered these solutions: jaxfront. (commercial tool). This does not generate source code. This is important for me because I...

how to bind the database value to a div?

hi, in my application i want to bind the data to a div, which is in a datalist so how can i bind the value .thank you ...

[wpf] drag-drop-operations causing drag operations to be invoked more than once.

I want to enable drag and drop operations in my application (c#, wpf). However I’ve concluded that my current model sometimes calls event duplicated. In the sample code below one sees the events that I’ve added to buttons in a stack-panel. The Stack-panel is data-bound against a collection of IToolboxItem. I’ve determined that due STA e...

WPF data validation is overriding theme on the interface

Hello! Good People I built a WPF application and manage to get the validation working thanks to posts on stackoverflow.The only probblem i'm having is that it's overriding the theme i'm using. example the theme makes the textboxes look like a round rectangle but after setting the binding it look like the default textboxes. here is my co...

WPF Combobox binding: can't change selection.

After wasting hours on this, following on the heels of my Last Problem, I'm starting to feel that Framework 4 is a master of subtle evil, or my PC is haunted. I have three comboboxes and a textbox on a WPF form, and I have an out-of-the-box Subsonic 3 ActiveRecord DAL. When I load this "edit record" form, the comboboxes fill correctly,...

Master Detail same View binding controls

Hi everyone, say I have a List View with ItemControls. And a Details part that shows the selected Item from List View. Both are in the same xaml page. I tried everything to accomplish it, but what do I miss? <!-- // List --> <ItemsControl ItemsSource="{Binding Path=Model, ElementName=SomeListViewControl, Mode=Default}" SnapsToDevicePix...

ASP.Net databinding in tag

I know you can bind in the code-behind, but I don't quite understand how it works if you want to declare it within the controls tag. This is for a custom collection. I thought it was just Datasource="<%# MyCollection %>" Where MyCollection is an exposed property of the class in the code behind? MyCollection{ get{ return _MyCollect...

DataGridView's SelectionChange event firing twice on DataBinding even after removing event binding

This Code triggers selection change event twice. how can I prevent it ? Currently i m using a flag or focused property to prevent this. But what is the actual way ? I am using it on winfoms EDIT My Mistake in writing Question, here is the correct code that i wanted to ask private void frmGuestInfo_Load(object sender, EventArgs e) { t...

How to combine Eclipse Databinding and UndoableOperations?

Hello... in my RCP - Project i'm using eclipse databinding to connect the ui with the backend. I want every change in an open editor to be undoable. My Domainmodell and UI are seperated in two different plugins. My current approach is to implement my own UpdateValueStrategy class for the databinding. I extend the normal UpdateValueSt...

XForms bind element error

Hi! I am changing my code to use binds in XForms (which is better practice than using nodesets everywhere!) but I am getting errors. The error message I receive is: "Error: XForms Error (8): id (data_criterion) does not refer to a bind element..." From tutorials/guides I have been using, it seems as though this should work, but clear...

Databinding multiple tables linq query to gridview?

My question is how can I display a linq query in a gridview that has data from multiple tables AND allow the user to edit some of the fields or delete the data from a single table? I'd like to do this with either a linqdatasource or a linq query. I'm aware I can set the e.Result to the query on the selecting event. I've also been able t...

Gridview with linqdatasource refreshing view?

I've a gridview bound to linqdatasource1 and a details bound to linqdatasource2 (for searching). When I update the data on detailsview, my gridview is not updating. I've tried handling various gridview events and databinding the gridview in code but it doesn't seem to work. ...

Can you data bind when your XAML is loaded at runtime?

I am loading some XAML pages that I have created that have some data binding in them. However, when I load these XAML files at runtime their data binding no longer works. I'm wondering if it's some kind of scope or pathing issue or if you just can't do it. Here is how I am loading the XAML using (XmlReader rdr = XmlReader.Create(@".\Tw...

Two-way binding on a ContentControl

I'm creating a Key/Value pair editor and would like for the value to have a custom template based on the data type. <TextBox x:Uid="txtKey" x:Name="txtKey" Grid.Column="1" Grid.Row="0" Text="{Binding ElementName=This, Path=KeyValuePair.Key}" VerticalAlignment="Top"/> <ContentControl Grid.Column="1" Grid.Row="1" x:Uid="Conten...

ASP ListView: How do I access the data that is databound to the rows?

I want to access the data that was databound to my list view when handling list view events such as: protected void List_ItemDataBound(object sender, ListViewItemEventArgs e) or protected void List_ItemCommand(object sender, ListViewCommandEventArgs e) Inside the events, I can not access the data via somthing like Eval("ID") Curr...

WPF TreeView HierarchicalDataTemplate Unlimited Nodes

I am having problems populating my treeview beyond the first level when the xml is using the same class name to have unlimited levels. I have used Xsd2Code to create the object class. To keep this post from being 3000 lines long, I am including a link for downloading the project. It can be downloaded here My XML example <Testing> ...

WPF DataTemplate Event binding to object function.

Hello, I'm currently writing DataTemplate for my custom type lets say FootballPlayer. In this template I would like to put ie. Button and make that button when clicked call some of FootballPlayer functions eg. Run(). Is there any simple or complex, but clean way to achieve this kind of behaviour? The DataTemplate I believe is aware of...

How do I setup a really simple WCF Data service and entity model that works?

Ok this is going to seem really daft but but essentially this is what i'm trying to do in a nutshell ... http://msdn.microsoft.com/en-us/library/dd465161.aspx The problem is that when I create the WCF Data Service and browse to it everything looks good at the root level and as soon as I leave the root I get http 500 errors. I get no d...

How do I bind a command to e.g. the right mouse button in a ControlTemplate in WPF?

I have a custom Control derived class and a view model to go with. The user can do several actions with this control, and I'm thinking it's best to implement these as RoutedCommand objects or ICommand derived objects in the view model so the ControlTemplates can bind to them. Binding a command to a button in one ControlTemplate should be...