Hi,
I am creating a windows application in c#,
I have 1 Datagridview and after I set it's DataSource it should have 3 Rows.
I have attached 2 Event Habdlers to the Datagrdview
void dgvProductList_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)<br>
{
//this gets called 4 times
}
private void dgvProductList_DataBinding...
I'm a bit stuck playing with DataBinding in a tryout project. I have a simple form with just a spinbox, which I want to bind to a member of the form.
class Form1 {
public class Data : System.ComponentModel.INotifyPropertyChanged {
int _value = 10;
public int value {get;set;}
public event System.ComponentMode...
I have a class ToolTipProvider
which has a method
string GetToolTip(UIElement element)
which will return a specific tooltip for the UIElement specified, based on various factors including properties of the UIElement itself and also looking up into documentation which can be changed dynamically. It will also probably run in a thread ...
I'm working on basic sql, using C# with binding options and adapters. I have sucessfully added data to my database and can then update with no problems. But when I try to delete some data and then UPDATE it throws an exception:
An unhandled exception of type 'System.InvalidOperationException' occurred in System.Data.dll
Additional...
I'm new to the whole WPF programming, but have been doing Windows Forms programming for a while. Anyway, I have a button that when clicked will run a stored procedure on a SQL Server and display the resulting data in a grid within the same window.
In windows forms world, I'd create a datatable, use a dataadapter to fill it and then ass...
This is a general how does DataBind work questions...
I have a simple page with a GridView that is bound (in the aspx code) to an ObjectDataSource.
I can look in the Select() function called by the ObjectDataSource to see that it is called on the initial load and on every post back. I have some logic that happens on post backs that wi...
Hi guys as the subject i posted. I really need to know, how to get result from DDL that can automatically changes the display in the TextBox. Our each item has got more than one size and sometimes the price will be different when you click on a different size. How can I implement this function?
Any help, I would appreciated.
Here is my...
I'm currently experimenting with Expression Blend 3 MIX09 version with the idea to use it primarily for an MVVM structured site with databinding, being able to view live data as I design. So far I've been very impressed and have to say that Blend 3's generated XAML is not as bad as people say it is. I got the following two examples worki...
Hi, We are using AspXGridView devXgrid for our web application. I have to assign two values (id,value) for a column in the grid. How can I do this?
Thanks,
P.Gopalakrishnan.
...
I've got a WPF Control that exposes one of it's children (from it's ControlTemplate) through a read-only property. At the moment it's just a CLR property, but I don't think that makes any difference.
I want to be able to set one of the properties on the child control from the XAML where I'm instantiating the main control. (Actually, I w...
I have WPF application with one main window.
In this window there are a series of buttons which form a menu and a space where user controls are loaded at runtime.
However, if the user changes data (stored in XML file) in one user control and then switches to another user control, the user does not see the updated data in the new user c...
I have a form with a list box and a few text boxes, when the user selects an item from the list box, i need the approptiate information to show up in the txt boxes and allow the user to edit it.
Here's my form Load event:
Private prt As New DataAccess.Part
Private Sub Form_Load(ByVal sender As System.Object, ByVal e As System.EventArg...
Hi,
What are the best practices or tips with respect to data binding to objects?
I have a complex data binding scenario where my winform has a BindingSource set to an object. This object is a class of type Customer and the forms are bound the customer's properties like "firstName", "lastName", etc.
Each property has the following pat...
Hi,
I have a user control which displays the currently logged in user's name. I have bound a TextBlock in the control to the UserId property of a User obejct in my application.
The issue I have is that the User object my binding has as a source changes each time a new user logs in.
I can think of a solution where I fire an event when ...
Suppose I have string Name and Image Photo as properties of a class in my DataContext. I need to bind them to controls is a DataTemplate.
I thought this would work but it doesn't:
<Image Source="{Binding Photo}"/>
Why not? Should I my Photo have another type? (BitmapImage perhaps?)
How can I bind an Image control to an Image proper...
I have a bool value that I need to display as "Yes" or "No" in a TextBlock. I am trying to do this with a StringFormat, but my StringFormat is ignored and the TextBlock displays "True" or "False".
<TextBlock Text="{Binding Path=MyBoolValue, StringFormat='{}{0:Yes;;No}'}" />
Is there something wrong with my syntax, or is this type of ...
I'm having some trouble with setting up an ObjectDataProvider with custom method parameters.
For a start I have a ListBox which is bound to a custom List which is set up programmatically with ItemsSource property. Then i would like to SelectedItem to be a parameter to my custom method. So in XAML i have:
<ListBox /*omitted*/ Selection...
I'm writing an app that lets users browse through data, and I want to use the FireFox UI style: allow the user to open as many windows as they want, each with as many tabs as they want. I also want to try to do this using the Model-View-ViewModel pattern as much as possible.
Opening a new tab should be easy enough to handle in MVVM. Mak...
I have this DependencyProperty which holds an entity with a property that is a collection (ShoutBox.Entities):
public static readonly DependencyProperty ShoutBoxProperty = DependencyProperty.Register("ShoutBox",typeof (ShoutBox),typeof (ShoutBoxViewerControl));
public ShoutBox ShoutBox
{
get { return (ShoutBox) GetValue(ShoutBoxPro...
I'm trying to accomplish simply adding a css class to a div on alternate rows in my <itemtemplate/> without going to the overhead of including a full blown <alternatingitemtemplate/> which will force me to keep a lot of markup in sync in the future.
I've seen a solution such as http://blog.net-tutorials.com/2009/04/02/how-to-alternate-r...