databinding

Some [Bindable] properties in Flex work, some don't

Problem solved, see below Question I'm working in Flex Builder 3 and I have two ActionScript 3 classes (ABC and XYZ) and a Flex MXML project (main.mxml). I have an instance of XYZ as a property of ABC, and I want XYZ's properties to be visible ([Bindable]) in the Flex project in text controls. Unfortunately, only prop3 and prop4 upda...

WinForms UI responsiveness when dealing with "heavy" data.

I'm modifying a windows form to allow data to be loaded in the background while the UI remains responsive. The data takes noticeable time to both retrieve and bind. Ideally, I would do both in the background, but there is some ambiguity about what kind of UI updates I should be doing in the background (as in outside the main thread). ...

Set TextSearch.Text for WPF-ComboBoxItem via DataTemplate

Hi Everybody, I use a datatemplate to visualize some items in a ComboBox, the ItemsSource is bound to an ObservableCollection. To keep it simple, let's say I put persons into the ObservableCollection: public class Person { public string FirstName { get; set; } public string LastName { get; set; } } My DataTemplate looks like ...

Problem with manually editing a textbox bound to a property that's continuously updated

Hi, I have a textbox bound to a property. The property continously gets updated from a timer. What I'm trying to do is to make it so that when I'm in the middle of typing something in the textbox, the textbox should stop updating itself from the property. Is there a way to do that? Thanks! ...

Programatically turn on and off databinding?

Hi, I have a text box declared in xaml that uses databinding to a string property. How do I disable and then re-enable binding in code? Thanks! ...

Get index with value in Checked List Box

I am actually finding that chkContactType.Items is empty when I step through the code. I even added a Watch to chkContactType.Items.Count and it is never anything but 0. I am severly confused now as it obviously isn't as my Insert method works fine which uses these same boxes and inserts the Value Member for each item.... I have som...

Data-Binding a WPF DataGrid Control to a System.Data.DataTable Object?

What do I need to do to get my WPF DataGrid control to bind to a DataTable object? I've been suffering over this for several days now. Even when the binding and the query both work correctly, and there is observable data in the table - nothing shows up in the data grid. My XAML code resembles this: <Window x:Class="DataGridTest....

Why isn't my datagrid updating?

I have an object that has as one of its properties, a List. I want to bind a datagrid to that list, such that when I add objects to the grid, the datagrid updates. I tried: myDataGrid.DataSource = myObject.MyList; but when I update the datasource with new rows, the grid doesn't update. Then I tried: myDataGrid.DataSource = null; m...

How do I bind a textbox to a Model parameter in a Strongly Typed View in Asp.Net MVC?

The only way I've seen this done in the tutorials I've looked at, they say to create a new .ascx and choose the option "create" for View Content. I want to be able to customize mine more with specific ID's... So, if I have a Customer that has data: string FirstName, string LastName, string Address. How can I bind my textboxes so that wh...

Is there a way to bind textboxes in a webform so the data is save as the user types in?

Hello! I have in my webform many TBs bound to a property in the code behind: <asp:TextBox ID="tbFirstName" Text="<%# Contact.FirstName %>" runat="server" /> <script language="c#"> public Contact Contact { get { return (Contact)ViewState["Contact"]; } } </script> <script language="VB"> ...

Copying a databinding in code?

Hi, I'm trying to change the Mode property of a databinding in code, but because databindings can't be changed after being set, I'm getting exceptions thrown. I was thinking of just making a copy of the databinding and using that, but the Binding class doesn't seem to be cloneable. Is there still a way to do it? If the above is not pra...

How do I bind an ASP.NET FormView to a single record?

The whole purpose of the ASP.NET FormView control is to display a single record at a time. So how do I bind it to a single record? It complains that Data source is an invalid type. It must be either an IListSource, IEnumerable, or IDataSource. I can wrap my object in a list if that's the only solution. In this application, the For...

ComboBox Selected Item in WPF

Hi, How to set the combobox selected item in xaml? I tried something doing like this <ComboBox x:Name="cmbProject" ItemsSource="{Binding Project}" DisplayMemberPath="Name" SelectedValuePath="Id" SelectedItem="{Binding Path=Project,Mode=TwoWay}" SelectedValue="{Binding Path=Id,Mode=OneWay}"/> The above code does ...

Silverlight 2.0 binding to images vs. Silverlight 3.0

I have a Silverlight 2.0 application which binds a listbox to a collection of classes that contain a BitMap property (which are used for navigation). I've both included the images in the XAP as content and created the BitMap manually and set it as the controls source and I have also embedded the images as resources in the DLL and got t...

Winforms Databinding object containing a List<T>

I'm having trouble with a situation that I know must be pretty common, so I'm hoping the solution is simple. I have an object that contains a List<> of objects. It also has some properties that reflect aggregate data on the objects in the List<> (actually a BindingList<> so I can bind to it). On my form, I have a DataGridView for the ...

Setting textBox.Text doesn't update bound twoway property?

Does it make sense that if the Text on a TextBox is databound to a property using the twoway mode and I set the Text to something, it should update the property? My property gets updated when I type inside the control, but not when I set the value in code. ...

How can I use the dropdownlist to populate/enter data?

Here's my existing code: <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="dsEmployees" DataTextField="Last_First" DataValueField="EmpNum" onselectedindexchanged="DropDownList1_SelectedIndexChanged"> </asp:DropDownList> ...

How to store value of data binding expression into variable.

Hi, I need to access the value of a bound item several times in a template. Right now my ListView template looks like this: <asp:ListView ID="ListView1" runat="server" ItemPlaceholderID="plc"><br/> <ItemTemplate><br/> <input type="radio" class="myrating<%# DataBinder.Eval(Container.DataItem, "Day")%>" value="3" /><br/> <input type...

What is the best way to start an animation when a bound value changes?

This is a situation that comes up often: In the View, you have a control bound to a ViewModel property (backed by a INotifyPropertyChanged). For example: <TextBlock Text="{Binding Path=Subtotal}"/> When the property changes, you need to bring the user attention to the fact with some creative animation. How I can utilize the fact that...

technology agnostic presenters - widgets

I'm experimenting with using widget interfaces and manual data binding to how it impacts using MVP in a .net application which uses more than one ui technology (ie, wpf, web, winforms). My broad question is to anyone who has experience doing something similar with their presenters: 1) is it worth the effort 2) do you have any referenc...