ASP.NET Databinding
What are the advantages/disadvantages of ArrayList, List, Hashtable and Dictionary in case of data bindable ASP.NET controls ? ...
What are the advantages/disadvantages of ArrayList, List, Hashtable and Dictionary in case of data bindable ASP.NET controls ? ...
I need to bind the double click event of a textblock (or potentially an image as well - either way, its a user control), to a command in my ViewModel. TextBlock.InputBindings does not seem to bind correctly to my commands, any help? ...
Silverlight 3 app with a TabControl bound to an ObservableCollection using an IValueConverter. Initial the binding works (converter called) on app startup. Changes, Clear() or Add(), to the bound collection are not reflected in the TabControl... converter not called. note: the bound ListBox reflects the changes to the bound collection ...
A simple WPF ListView: <ListView Name="recordContainer" ItemsSource="{Binding Path=MyCollection}"> <GridView> <GridViewColumn Width="260" Header="Name" DisplayMemberBinding="{Binding Path=Name}"/> <GridViewColumn Width="100" Header="Value" DisplayMemberBinding="{Binding Path=Value}"/> </GridView> </ListView> MyCollec...
I have a winform with a few textboxes databound to an object like so tbdecimalProp.DataBindings.Add("Text", activeUserInput, "decimalProp") One of the properties I bound to is type Decimal. When the user enters text into textbox, and the control is validated, the users input is lost, and the value in the textbox reverts to what it was b...
This is related to another question of mine, and unfortunately I'm having a difficult time summarizing the issue in my Title--so please bear with me. I've created a databindable class called Folder which implements a ITreeItem interface and inherits from BindingList<ITreeItem>. I have a second class, TreeLeaf, which is a leaf in the tr...
So I'm running Extjs on top of Rails 2.3.3 against a SQL Server DB. I'm able to pull data from the DB and display it, but I'm unable to create, update or destroy. Oddly enough, it's not throwing console or any other errors on attempted updates or deletes -- it simply fails. On create, an InvalidStatement error gets thrown, probably r...
When I bind a BindingList<ProcessDataItem> to a ComboBox an InvalidOperationException is thrown saying, that the collection that is enumerated changed. Instances of ProcessDataItem permanently receive updates when their corresponding measurement value has changed. The class implements INotifyPropertyChanged to notify its container of tho...
Here is what i have: a SQL CE database, that holds this Category table, with id and name columns only. dbml generated with sqlmetal singleton (static class) that exposes the linq DataContext. in the code-behind file, i have a property like follows: private System.Data.Linq.Table Categories { get { return LibraryDataSt...
I have an ItemsControl which is bound and set to an observablecollection in my viewmodel: <ItemsControl ItemsSource="{Binding AwaySelection}" > <ItemsControl.ItemTemplate> <DataTemplate> <RadioButton Content="{Binding AwayText}" ></RadioButton> </DataTemplate> <...
I'm working on a WPF interface that reads an XML file and displays the data. The XML file would be something like this: <People> <Person Gender="Male"> <Name>Joe</Name> </Person> <Person Gender="Female"> <Name>Susan</Name> </Person> </People> I need a data template dependent on the Gender attribute of ...
The code below is my current solution. If it takes you a couple minutes to figure out what this code is doing, I hear ya. This is an ugly mess if ever there was one. I would kill to see an alternative, (but don't let that discourage you from responding... :-). Oh jeez, I even abbreviated it (substantially) by removing the converter...
WinForms databinding has very solid support for navigating related DataTables via DataRelation objects, but I'm having a difficult time finding resources for implementing similar functionality for databinding against a business object. Does anyone know of an equivalent to the DataRelation object, or know of any resources on implementing...
I have this combo bound to a linq table. Is there a lightweight way to update the UI (combo values that are displayed to the user) when I insert a new record in the linq table? Basically from what I understand I should have used an ObservableCollection, but I don't want to copy the data back & forth from the linq table to that collect...
Hi, Using c# .net 2.0 , I want to bind a textbox to a specific row of my table. In Example : Table Person ID NAME PRENOM SPECIAL_CATEGORY 1 BOB BOB mex 2 AL AL tot 3 PO PO pap I want to bind my textbox on the field name where the row contains special_categeory = 'tot'. Is it possible? or I need to create a D...
I have this XAML: <Window x:Class="WpfBindToCodeBehind.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" Loaded="Window_Loaded"> <StackPanel Orientation="Vertical"> <Button Name="ToggleExpa...
I have a sorted list. When I bind it to a listbox, it does not shows the item in an ordered manner. territoryListBox.BeginUpdate(); this.Text = ((INamedEntity)_currentList[0]).Name; territoryListBox.DataSource = _currentList; territoryListBox.DisplayMember = "Name"; territoryListBox.Sorted = true; territoryListBox.EndUpdate(); The fir...
Is it possible to edit and update a GridView cell without using <asp:TemplateField> and/or <%# Eval("Name") %> and/or <%# Bind("Name") %> and/or SqlDataSource ? NB : I want to use only C# code in the behind and SqlConnection, SqlCommand, ExecuteXXX, etc. NB : Plz provide me code(C# and aspx) or a web-link containing code. ...
Hi! I'm writing my own UserControl which displays data in a ListBox. I want to achieve something similar to a property like "DisplayMemberPath". In my example, it's "EditableMemberPath", which should determine which member will be displayed in the textbox. However, using a binding on a binding does not work. <ListBox ItemsSource="{Bind...
Hi, I'm trying to change the content of a ContentPresenter to one of my View Model class. I manage to have it shown properly, once I change this content (property) from my model, it doesn't update the ui. The following lines link my view model classes to their respective ui (setting their data context automatically) : <DataTemplate...