why i couldn't see any data in WPF Grid?
<DataTemplate x:Key="tmpGrdProducts"> <Grid> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> <RowDefinition/> <RowDefinition/> <RowDefinition/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> ...
<DataTemplate x:Key="tmpGrdProducts"> <Grid> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> <RowDefinition/> <RowDefinition/> <RowDefinition/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> ...
Hi folks, As some of you have discovered, a new feature (?) appeared WPF 4, where the data binding engine may pass your custom control instances of the class MS.Internal.NamedObject with the name "{DisconnectedItem}" into the DataContext - instead of the data item your code is expecting (this happens when a templated control is disconne...
I have lots of nested controls in the panel and I want to disable all of them, but leave scrolls enabled. Basically, I'm setting IsEnabled property of the root element (panel) to false using binding. But this disables scroll as well. Any ideas (except adding IsEnabled to each control instead)? I'm using MVVM. So, in code it looks like t...
I have two User Controls in my window, both are bound to the same context. One of them is getting updated and the other is not. What could be the reason? ...
Hi, I've recently taken over a MVVM project started by someone who's now left the company; It's my first time using WPF, but by the looks of it, it was his first time using both WPF and OOP... Anyway, I've got a ListView in the XAML, and I've got a collection class which doesn't currently contain a "SelectedItem" property. Can someon...
Ok, I have a treeview which I am using to display a number of nodes. I wish to attach data (three textbox fields) to each node but I do not want to show it in the tree. I wish to save the data to a string[] Array if possible. I want the data in the boxes to save to the Arrays when I click on a new node in the tree and pull the informatio...
This is a strange one. I have a couple of hyperlinks that I use for paginating a RadGrid (next page, prev page). All works well until I decided to hide one or the other when on the first/last page. So I added the Visible attribute and set a value of true/false using a databinding expression like so: <asp:HyperLink Visible="<%#(int)DataB...
Hello I have a problem with my datagridview that is binding to an access table(access 2007), I can retrieve data from the database, but when I wan to store data I cant, even no code is generated, I just want that the user fill some rows in the datagridview and store them in the table of the database, please help me I am new to C# ple...
HI I have 5 different database and a Master DB with same Schema .I am looking for a tool which can check any changes( new row insertion ) has happened since my last update and Sync with my Master DB . Is there any tool available for this ...
Binding to a Dependency Property is easy in code-behind. You just create a new System.Windows.Data.Binding object, and then call the target dependency object's SetBinding method. But how do you do this when the property which we're binding is a CLR property and you can't provide a DependencyProperty argument to SetBinding? EDIT: The ob...
As you may know, we can declare a string "variable" using resource: <sys:String x:Key="someKey">someValue</sys:String> I want to replace someValue by a binding property, how can I do it? ...
Hi, Currently struggling with a problem that I've encountered variations on in the past. At the moment a worthwhile solution escapes me, but it seems such an obvious issue that I can't help wondering whether or not there's a "best practice" approach I should adopt. Without code, here's the issues in a nutshell: page has databound con...
I have a control that i want to be visible only if atleast one of a series of properties return true. I was about to implement my own BooleanOrToVisibilityMultiConverter, but it feels like there must be a better (and completely obvious) way to do this. Please enlighten me! ...
Hello all I use nhibernate to access a mysql database, and I have many -winforms- forms using databinding to modify properties of those objects. There are many –nhibernate- objects created/deleted also during the time those forms are used. I need to implement a "Cancel" button on those forms. I can defer the creation/deletion of objec...
Hello everyone, my problem is the following : I have defined a TextBox as a child of a ToolBar in a ResourceDictionary (x:Key MyToolbar). When my application loads, it places the ToolBar correctly inside the Window frame, along with its TextBox. So far, so good. Of course, I'd like that very TextBox to be two-way databound to some obj...
I'm trying to do this as MVVM as possible: My Model (InterestTypeEntity) implements INotifyPropertyChanged. My ViewModel (InterestTypeAllViewModel) has an ObservableCollection that binds to a DataGrid. When changes are made to it, it sends those changes (add/remove) to the Database. the problem is, I want to also be able to update the d...
In my user interface I sometimes want to put titles above usercontrols. I want to declare these titles in XAML for future localizability, so I want to keep them out of the datacontexts. Can databinding fetch them from a property set on the root node of the usercontrol? I have boiled the problem down to the following code example: usi...
I have what I think is a very simple databinding question (I'm still new to WPF). I have a class (simplified for this question) public class ConfigurationData { public int BaudRate { get; set; } } In MainWindow.Xaml.cs I have a private member variable: private ConfigurationData m_data; and a method void DoStuff() { // do...
I'm probably searching for this the wrong way, but: is there any way to get the resulting value of a binding through code? Probably something glaring obvious, but I just can't find it. ...
I need to add a variable pair list in a form (Name-Value). I decided to set it in a datagridview, and use simple binging to manage it (.NET 2): public class EventParameter { private string name; public string Name { get { return name; } set { name = value; } } private string value; public strin...