In WPF, I have a ListView bound to an ObservableCollection in the code-behind. I have working code that adds and removes items from the list by updating the collection.
I have an 'Edit' button which opens a dialog and allows the user to edit the values for the selected ListView item. However, when I change the item, the list view is...
Let's say that I've got the following class hierarchy :
public static class Constants
{
public enum MyEnum
{
Value1 =0,
Value2,
Value3
}
}
public class Data : INotifyPropertyChanged
{
public Data(string name, ushort id, Constants.MyEnum e)
{
DataName = name;
DataId = id;
...
I would like to display clickable news headlines. But I'm having trouble pulling data from two datasources for a single GridView. I'm trying to do this DataSourceID="SqlDataSource1, SqlDataSource2" but that's not working. Thanks in advance.
<asp:GridView
ID="GridView1" runat="server"
AutoGenerateColumns="False"
...
I have a custom control with a TextBlock inside it:
<Style TargetType="{x:Type local:CustControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:CustControl}">
<Border Background="Blue"
Height="26"
Width="26...
I have a UserControl that contains a listbox.
On the parent window, I have this UserControl and a button.
Ideally I'd like to use the ChangePropertyAction behavior on the parents button, and tie it to the UserControl's listbox count.
The idea being that if there are no entries in the listbox inside the usercontrol, the button on th...
I thought I'd save myself some time by throwing down a GridView in an admin tool I was working on. This particular page is for editing Categories that “widgets” can then be assigned to. For organizational purposes, categories can (optionally) also be grouped (assigned to a CategoryGroup). There were already existing business logic and ob...
The official site is quite scarce and most of the examples are EMF- related and for Eclipse 3.5 But what if one uses 3.4 target Eclipse platform and does not use EMF.
I am specifically interested in Tree Viewer examples, but good example and documentation is always appreciated.
...
In my Combo box i have to shows team names condition based . So i will try like
dataProvider="{usersXML.users.user.(id=10).name}" but shows some errors . but if i tried
dataProvider="{usersXML.users.user.name}" display all name . It's working .
How can i condition based to display the list . In combobox . Plz refer me . is it possiab...
I have some reusable ContentControl, which acts as a pseudo-modal popup inside another view.
It is always there and only its visibility makes it appear or disappear.
When instantiated, within the ContentControl there will be a custom ContentTemplate, bound to some ViewModel and representing the content of the "modal popup".
<Dialogs:Mod...
I have a DataGrid of seats available, each with a checkbox to be able to reserve the seat. In the button click event, if the CheckBox is clicked, I am adding the contents of the row to an ArrayList, then adding the ArrayList to a session before redirecting to the confirmation page:
protected void Reserve_Click(object sender, EventArgs e...
What is the best solution for not being able to use data binding on a ValidationRule property since ValiationRule is not a DependencyObject?
Below is an example of what I would like to do. I want to be able to validate the text in the TextBox against some other DependencyProperty.
<TextBox Name="myTextBox">
<TextBox.Text>
<...
Good evening all.
I have a bit of a puzzler for you.
On my page I have a cascading ddl (ddlBuyer), a textbox search (tbxProdAC) and a radio button list (radTopx). These, once populated, and a submit button clicked, produces a gridview populated with data. What I am trying to achieve is that the user can only select either the ddl, the ...
Hi
If ObjectDataSource.SelectMethod = A and if A() returns a single object of type O, then this object is wrapped in a one element IEnumerable collection and returned by the ODS.Select method
Thus, assuming ODS.SelectMethod points to method A(), then if A() returns a null , when called by ODS, this null is ( I assume ) wrapped into ...
How do I set the DataContext of "myElement" to the same DataContext as the user control in XAML? I have been able to do it in code-behind via myElement.DataContext = this.DataContext in the UserControl constructor, but I'm trying to understand how to do the same thing in XAML.
This is related to creating virtual branches to the logical ...
Is there a technical reason why ValidationRule is not a DependencyObject?
...
I have a class called Client, which is a subclass of Configurable.
I have an ObservableCollection<Client> which I need to view as an ObservableCollection<Configurable>. This will allow me to databind to the list from some general layout generation code. It must also allow me to clear the list, and to add items to the list. Of course...
Hi there,
Ok, firstly I have the following code working.. although my question is this; should I code the combobox databinding like the following example, or is there an easier/more efficient way?
Firstly, I needed to manipulate the results back from the database to show a more descriptive meaning:
(I am using a basic class for the ke...
I have a mvc view made up of a matrix of radio buttons. Each row of radio buttons is in a group and represents a typed object from the model. Using the guidance of various blogs and postings I have successfully bound the posted form results to the typed model array in the controller action, however cannot seem to successfully reverse t...
Hi,
I'm just getting started with Linq-to-SQL and data binding in WPF, most of which works like a dream so far!
I've got (what I though was) a common scenario:
a) Query list of records from a table via datacontext and bind to the current user control
this.DataContext = db.ClientTypes;
b) Have the user see a bound ListView and some ...
Is there a reference for data binding? I've seen a bunch of different ways to data bind things, but I've never found a reference. Is there one?
I know there are Bind and Eval, but when does Container.DataItem come into play? Are there other "hidden" objects and methods available? Or is Container.DataItem the object that is being use...