all groups > dotnet windows forms databinding > december 2006
How to clear old data from DataGridView and DataSet?
Posted by David Mayerovitch at 12/31/2006 1:27:05 AM
As an exercise in learning Visual Basic 2005, I am putting together a simple
XML editor.
I place on the form the objects DataGridView1 and DataSet1.
' Read an XML file into DataSet1:
DataSet1.ReadXml("BIRDS.XML")
' Bind the DataGridView to the DataSet:
DataGridView1.DataSource = DataSet1... more >>
Combobox SelectedIndexChanged with NULL firing twice
Posted by Erik Reischl at 12/29/2006 12:22:44 PM
Hello everybody,
I have a combobox with databinding to an attribute which can have NULL
values. I noticed the strange behavior that when I select the row with such
a null value in a datagrid, my combobox first switches to SelectedIndex = -1
(SelectedValue = NULL), but then it goes back to the ... more >>
BindingSource Position override
Posted by John Lapenta at 12/16/2006 12:02:00 PM
We're using BindingSource and BindingNavigator controls to build some Windows
Forms classes to update our Data Tables.
We typically present a single Data Row on the screen at a time. I would
like to be able to catch a user attempt to move to a new row. That would
provide a place to vali... more >>
"Object does not match target type" Weird bug
Posted by nico193 NO[at]SPAM numericable.fr at 12/16/2006 3:09:57 AM
Hello everybody !
I'm back again with a very strange bug, hope it will get more answers
than my previous bug reports
I have a very simple class structure :
- An abstract mother class (OMBindingItem just inherits from IEditable)
:
using System;
using System.Collections.Generic;... more >>
DataMember property "DataRelationName" cannot be found on the DataSource
Posted by Glenn at 12/15/2006 12:00:00 AM
Hi
I've created typed DataSet and as part of the constructor I've added a
DataRelation. It compiles and I can see the relationship between the tables
in the Data Sources window.
After adding the parent table as a DataGridView to the form, I attempt to
add the related child table, again ... more >>
VS 2005 formatting and parsing bindings
Posted by javier at 12/14/2006 12:58:09 PM
In order to get a decimal separator with both keys "." and ","
I place this code in my form load event and I get the "," replaced with ".".
This used to work fine in VS2003 binding directly to an object but in
VS2005 I get the focus "stucked" at the combobox cause every time I click
everyw... more >>
Adding data via the BindingSource
Posted by Glenn at 12/14/2006 11:51:31 AM
Hi
I've been tinkering with Win forms databinding, which, provided you have
some data in your datasource seems to work really well.
However, I've been trying to create a form which creates a new record in an
empty strongly typed DataSet DataTable where the DataTable is the
BindingSource.... more >>
Editing items in a BindingList
Posted by James Crosswell at 12/12/2006 2:19:35 PM
I have created a binding list and added some objects to this. I've then
bound various properties of the GUI controls on a form to properties of
the object in the binding list. This works fine and the GUI displays the
properties of the objects in the BindingList.
However, none via the TextEd... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Binding.Format event not triggering
Posted by jarbjarb at 12/11/2006 5:24:20 PM
..Net v1.1
I am basically doing the following to display a db decimal value formatted as $:
textBox.DataBindings.Clear();
textBox.DataBindings.Add(
new Binding( "Text", ds.dtable, col_name )
);
textBox.DataBindings[0].Format += new ConvertEventHandler( CvttoCurrency );
It works fine a... more >>
Trouble binding controls to datasource
Posted by AlBruAn at 12/10/2006 8:03:01 PM
What would cause the IDE to blow up whenever I try to bind a combobox to a
BindingSource? The first time it happened, I thought it was a one-shot deal;
but it happened the next two times I loaded the project and attempted to bind
the combobox to the BindingSource. This is ridiculous!... more >>
One-way databinding
Posted by Rock3 at 12/10/2006 9:53:00 AM
I want to set one-way databinding from controls to dataset. How?
For example: I manually set Items for comboBox and I want selectedText
passed to dataset when I accept changes. I don't want comboBox bound to any
source... more >>
ComboBox binding
Posted by Dave at 12/6/2006 11:23:19 AM
VS 2005 VB.Net Framework 2
I have a combox on a form if the user uses the mouse to select the data the
data is updated correctly.
If on the other hand if they tab on to the control and use the arrow keys no
data is recorded.
The only similar item I've found so far is this, but with no a... more >>
newbie- adding (and showing) only certain rows in datagridview based on contents of a column?
Posted by Keith R at 12/3/2006 6:17:44 PM
Using VB.net 2005 express and SQL express. I have no database experience,
and after searching, I haven't found code that I recognize as close enough
to adapt to what I need. Pointers to web resources, or code snippets, are
all appreciated. My background is mostly Excel VBA and just a few littl... more >>
DataBinding to a UserControl
Posted by Guru at 12/3/2006 1:05:48 AM
Hi,
in my .NET 2.0 application I'm using databinding for binding the data of my
data class with the controls of my main form. For the handling of my data
class I'm using a bindingSource object as member of my main form.
On my main form I'm using a usercontrol with for example 5 TextBox contr... more >>
|