When binding WPF Toolkit DataGrid to SQL database through LINQ to SQL, how to correctly set binding source:
should it be some generic collection, filled and updated by LINQ to SQL queries or there is a possibility to directly connect DataGrid with LINQ to SQL queries?
...
What is the best-practice for maintaining the integrity of linked data entities on update?
My scenario
I have two entities "Client and
Invoice". [client is definition and
Invoice is transaction].
After issuing many invoices to the
client it happens that the client
information needs to be changed
e.g. "his billing addres...
Hello
I am trying to syncronise the selectedvalue of a combobox when navigating through records. Setting the combobox.selectedvalue doesnt work. I have tried refreshing the combobox but that doesnt work either. The combobox is databound.
Any ideas?
...
I want to implement a very simple list control. It has 2 properties:
RowTemplate (ITemplate)
DataSource (IList)
The control implementation must render each row using the template specified in RowTemplate passing the corresponding object in the DataSource list, so that, if I have a property called Name in the passed object, it would b...
I wonder just what can cause a form not to close.
I have a big form, with several TabControls, DataGridViews and many DataBound-Controls, at least 10 BindingSources are involved. (Thats the point why I can't post my code here, sorry).
Now, I have the problem, that somewhere in development (just refaktoring) the form stopped closing co...
Hello,
I'm trying to get a command in my ViewModel executed when the user clicks on a item in a ListView. When I add a ListViewItem in XAML I can just add a MouseBinding to its InputBindings.
<ListView>
<ListView.View>
<GridView>
<GridViewColumn Header="Test" />
</GridView>
</ListView.View>
<ListViewItem Content="Item...
I have a form that is has many controls databound to a object with many properties and child objects.
When we call EndCurrentEdit on the BindMaster, it throws the following exception:
ArgumentException occurred: Object of type 'System.DBNull' cannot be converted to type 'System.String'.
Now I'm assuming that some property in the o...
The project I came into manages databinding like this:
Default object is loaded on form load.
Object is databound to each control property by property in code.
User selects a different object to view.
All controls have their databindings cleared.
All controls have a databinding added referencing the new object instead of the old.
I h...
Let's say a control X has a template called RowTemplate.
So X's markup would be like:
<foo:X>
<RowTemplate>
<foo:Y>...</foo:Y>
</RowTemplate>
</foo:X>
My question is: How can the Y control be sensitive to the data context? I know I can use template inline tags to get access to the data context: <%# Eval("Id") %>, but ...
I'm working on a timeline that marks regions of audio signals when the user clicks the start and stop button. The user may click start and stop multiple times during a sampling session, and the time between presses should appear in the timeline as highlighted sections.
The overall design is an ItemsControl whose ItemsPanelTemplate is a...
I have a ViewModel that provides a collection of Items. There is also a ActiveItem propery. The Items collection may or may not contain ActiveItem.
What I want to do (in XAML) is display the items as a list and highlight any of the items that are equal to Active Item.
I have tried the following with no success:
<ListBox ItemsSource="{...
Hello everybody,
I was trying follow almost all tutorials regarding wpf data binding,
I stil have problem to bind a comboBox with enum property which defined by me in a different
namespace.
The enum:
namespace H3S.Interopability
{
public enum eDataBits
{
DataBits5 = 5,
DataBits6 = 6,
DataBits7 = 7,
D...
I want to databind to a collection property, such as Count.
in general, when I data bind I specify data member for the object property in the collection, not for the actual properties collection itself exposes.
for example, I have a list of custom objects. I show them in datagridview. but I also want to show their total count using a s...
Perhaps it would be better if I explained why I need to do this.
This is not the true example, but in my working solution, the user will start with a relation group like this:
Apple -> Red
Banana -> Yellow
In the app, in different screens (e.g. Add fruit and add color) they have the power to add new fruits/colors. They then need to li...
I have a database with a table that records data coming from various sources.
3 columns
'Source' 'Value' 'Timestamp'
e.g.
source1 21 '11:03'
source6 22 '11:03'
source9 456 '11:03'
The table is updated 2 to 3 times a second.
Each Value may or may not change.
Each 'Source' value is displayed in a seperate label or text box on the s...
I have several MenuItems whose Commands are bound to my ViewModel. Until today, all of them execute properly.
Now I have added a MenuItem whose ItemsSource is bound to an ObservableCollection. The point of this MenuItem is to enumerate a list of plugins so that the name of all plugins show up. Then when the user clicks on a plugin na...
Hello,
Is there a way to bind Combobox datasource with an column from bindingsource?
The following example works fine:
//fill combobox with some data
cBox.DataSource = dataSetOne.Table[0];
cBox.DisplayMember = "columnA";
cBox.ValueMember = "columnB";
//bind columnB from dataSetTwo with combobox
cBox.DataBindings.Add("Text", dataSetTw...
Hi All,
Please forgive the noob question but I'm going round in circles and need answers...
Anyway, I've been looking at this article WPF: How to bind RadioButtons to an enum? but I just can't get the convertor to be recognised within the XAML file.
<Window x:Class="Widget.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/...
The system I'm working on uses a large number of custom value types internally. I'm working on a prototype UI using WPF. WPF does not know how to display the custom types. I know that I can write a custom ValueConverter to do this, but I really don't want to have to specify the use of a converter every time I bind to a class in my XAM...
I have 2 classes that implement the same interface,A Client And a Spouse
Both implement IClientBase,but client actually implements IClient(which extends IClientBase a little bit further),Spouse only inherits from IClientBase.
A client class,contains a spouse.
I have built a few usercontrols and used databinding so i can bind the client o...