I have two Entity classes: Order and OrderItem. Order contains a navigation property OrderItemSet of type
System.Data.Objects.DataClasses.EntityCollection<OrderItem>
On an aspx page is a FormView bound to this EntityDataSource:
<asp:EntityDataSource ID="EntityDataSourceOrder" runat="server"
ConnectionString="name=EntitiesContext...
Hi,
I have a WPF app that is using the MVVM pattern. Hooking up buttons to the VM is pretty straight forward since they implement the ICommand. I have a context menu that works similar. The next step is to create shortcut keys for the context menu. I can't figure out how to get the shortcut key invoke the Command. Here is an example:
...
I want to delete the current row in a grid only if a specific value exists in a column.
How can I get the details for the current row?
...
For a large fillin form I use the asp.net FormView for the magic databinding to my model. In this model I've a property called Rides (shown below), which exposes a list, which I obviously not want to be replaced entirely. So I made it readonly.
However, this way I can't use the databinding features anymore. Is there a common solution fo...
I'm using a DropDownList with a data source which successfully populates the list. However, I want one of the items to be selected, namely the one where the value matches the path and query of the current request.
ddlTopics.DataSource = pdc;
ddlTopics.DataBind();
foreach (ListItem item in ddlTopics.Items)
{
item.Selected = item.Valu...
I have an ObservableCollection of addresses that I am binding to a ListBox. Then in the ItemTemplate I am Binding to the current address record using {Binding .}. This results in my addresses displaying using their ToString method which I have setup to format the address. All is good, except if I update properties on an individual addres...
I have a chart in a user control. As I want to use multiple charts in the app, I need to set stuff like title of a series for each instance of the user control. It works fine so far, but I'm not able to bind a variable (e.g. seriesTitle) to a target in the user controls xaml.
Please see following code:
Using the user control in MainPa...
My question is : how to move beyond writing a custom implementation of a technique for databinding multiple controls (controls without built-in DataSource properties), for each possible type of data, to simple properties ... as described and demonstrated in code that follows ... to achieve a more poweful solution that will be independent...
I'm just testing a simple databind expression with:
<div>
Now: <%# DateTime.Now.ToString()%>
</div>
According to MSDN:
http://msdn.microsoft.com/en-us/library/bda9bbfx(VS.71).aspx
literal text <%# data-binding expression %>
should work.
When I compile, it's OK but I got a blank instead of Now DateTime.
What's wrong ?
...
* EDIT *
Sorry, I should make it clearer.
Imagine I have an entity:
public class MyObject
{
public string Name { get; set; }
}
And I have a ListBox:
<ListBox x:Name="lbParts">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</List...
Hi
Almost the same question has been asked a year ago, but the there has been some new development in this area.
Selecting a (data binding) framework for swing application seems to be quite difficult. JSR-295 is abandoned, many swing frameworks which provide binding are work-in-progress, abandoned or too heavy for my quite simple app....
Since beginning to use VB.NET some years ago I have become slowly familiar with using the data binding features of .NET, however I often find my self bewildered by it's behavior and instead of discover the correct way it should work I find some dirty work around to suit my needs and continue on.
Needless to say my problems continue to a...
System.Windows.Data Error: 43 : BindingExpression with XPath cannot bind to non-XML object.; XPath='CarModel/PercentFront/@Visible' BindingExpression:Path=/InnerText; DataItem='String' (HashCode=-671055389); target element is 'StackPanel' (Name='PnlPercentFront'); target property is 'Visibility' (type 'Visibility') CurrentCarConfig
My s...
A project I'm working on is suffering from some minor performance issues. Our team is performing many small improvements to achieve larger gains in performance. We've managed to help the application out some by making some more obvious changes, and we've looked to data binding to provide some additional improvements. I know the default b...
I asked this question a few weeks ago and didn't get the answer I was looking for, so figured I'd ask again a little differently.
I need to construct a form in my UI which will allow users to view and edit complex, nested objects. If I were doing this the JSP way, I would use Spring's bind functionality to associate form fields with bac...
Hi everyone.
I have a problem I am trying to fix and it's sorting a DataGridView on multiple columns. I have read that this option is not a feature built-in the DataGridView and I have to implement it. I have found multiple solutions, but none quite got to do the work.
I'm also quite a newbie in C# and I don't know much of the .Net lib...
I have started using BindingList(Of T) for my generic collections whenever I need the objects to interface with the GUI instead of List(Of T). This has worked well for me so far but a few of my collections are stored in Dictionary(Of TKey, TValue) and there doesn't appear to be a corresponding BindingDictionary(Of T).
Has anyone else co...
I have defined a default binding in my style.
For example I have configured the visibility binding of my button so that it must not be visible if the relative command can not execute.
This is my default binding behavior.
Apart from my default behavior, every view can customize the buttons it uses with another visibility binding.
I w...
When I run the following Silverlight app, it gives me the error:
AG_E_PARSER_BAD_PROPERTY_VALUE [Line:
12 Position: 35]
I've tried the same code in WPF and it runs fine, i.e. the middle grid row correctly resizes based on the bound value.
What do I have to change in this code to avoid this error in Silverlight?
XAML:
<UserCont...
I've been unable to find any info on this, which seems like it could be the only way to solve a past unanswered question of mine on SO. However, I think this should really be a separate question now.
I am wondering if there is a way to dynamically redefine an ICommand-derived class's CanExecute method. I'm still new to .NET and perhap...