all groups > dotnet windows forms databinding > november 2005
Filter by week: 1 2 3 4 5
Simple data binding to a textbox
Posted by Arne at 11/30/2005 11:56:09 AM
Databinding works only one way
da.Fill(data, "SubClass")
SubClassDescription.DataBindings.Clear()
SubClassDescription.DataBindings.Add("text", data.Tables(0) ,
"SubClassDescription")
Putting the edits back into the data source doesn't work!
Dim manager As BindingManagerBase
manager = Me.Bi... more >>
DataGrid null values !
Posted by Stanislav Nedelchev at 11/29/2005 11:10:24 AM
Hi to all,
I have problem with detecting null values in datagrid cell
here is the example code i get i get runtime error when i'm trying to
convert datagrid cell to string if it have null value and i want to
make check if cell have null value i want to skip operation.
Here is the example code
... more >>
Methodology for populating a combobox
Posted by DS at 11/29/2005 1:30:51 AM
I'm using business objects (as opposed to DataSets/DataTables) to
contain all my data and I'm passing these to forms to populate them.
They get sent to the form's constructors and populate all the controls
onLoad, and when someone hits save, I validate all the values, then
write them back to... more >>
Does Adding More Than 1 Binding Work in VS2005?
Posted by gary59 NO[at]SPAM chartermi.net at 11/28/2005 5:18:41 PM
If I bind multiple properties of a single control to different sources,
only the first one ever works. For example, I subclass a TextBox and
add an IsLocked property. I then add bindings for the Text property and
my new IsLocked property, but only the first property will ever be
bound. I can rev... more >>
Using CurrencyManager's ItemChanged Event correctly
Posted by michael at 11/27/2005 6:47:03 PM
I assumed that the CurrencyManager's ItemChanged event could be used to
identify that some part of a row has changed and allow for the opportunity to
ask the user if they want to keep the change (or not) prior to changing the
CurrencyManager's position.
I have found the that ItemChanged eve... more >>
How to change color of edited winforms datagrid cells?
Posted by glevik NO[at]SPAM gmail.com at 11/25/2005 6:19:24 PM
Hello,
I would like for WinForms Datagrid cells whose value has changed to
stand out in some way - background color, font etc. I know that I can
override the paint event to change cell appearance, but paint is not
useful to me for detecting when cell contents have changed. I also know
that I ... more >>
reset a unbound form after a record deletion
Posted by Stephen at 11/25/2005 5:55:38 AM
I am using Visual C# Express (.net 2.0) and I am wondering if there is
a way to reset a form. I come from asp.net and I am used to binding
the data in code during the page load event. Winforms offers
databinding more like ms access, where you can bind the form directly
to a dataset, but I pref... more >>
dataview, which row is selected
Posted by Paul Wohlhart at 11/25/2005 12:00:00 AM
hi
i'm a complete newby to the adonet stuff. so i'm facing beginner problems.
i have a DataGrid bound to a table called data
dataGrid.DataSource = data;
data gets filled by a DataAdapter da
da.fill(data);
the table has two rows: "id" and "name".
since i inserted a TableStyle to ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
combobox inside datagrid
Posted by Rick at 11/24/2005 12:43:57 PM
hi group!!
my question is in a datagrid i have 3 columns, 2 columns are just text,
third is type combobox, can i load in that combobox values from other table
that is not the same the grid displays? (if true, how can i do it?)
Thanks!!
... more >>
Combobox simple Question -- MVP please Help --
Posted by mf_sina at 11/23/2005 9:40:58 PM
Hi all!
I have a textbox which has a read-only proprety. which it's text can be
selected and copied but not edited.
but i didn't find readonly property for a combobox. setting enabled property
to false will make it disabled. the text can't be selected or copied.
What's the best way to hanle... more >>
Simple ComboBox Databinding Problem
Posted by Mike Robbins at 11/23/2005 9:32:07 AM
When I open my form, the textbox is bound and will change when the position
in the dataset is changed, but the combo box is blank. The items in the
combobox list are populated.
The combo's datasource is an ArrayList of Facility objects. The ID is being
stored in the SelectedValue as I can deb... more >>
Combobox doesn't have readonly property???
Posted by mf_sina at 11/22/2005 2:24:07 AM
Hi all!
I have a textbox which has a read-only proprety. which it's text can be
selected and copied but not edited.
but i didn't find readonly property for a combobox. setting enabled property
to false will make it disabled. the text can't be selected or copied.
What's the best way to han... more >>
threads for reading data to textarea
Posted by ajijv at 11/21/2005 6:47:05 AM
How can we use multi threading and use them to read files into tex
areas? 50 kb of data should be read and then there should be wait of
second(should not use sleep()) and resume the remaining read upto nex
50kb after that
--
ajij
------------------------------------------------------------... more >>
Accessing data in AddNew row
Posted by RRB at 11/19/2005 6:24:10 PM
Hi,
I have a datagrid with some columns that cause recalculation of values
in controls elsewhere on my form. These recalculations need to occur
when these datagrid cells have changed (I tied to the Validated event).
This is also true for the AddNew row.
My recalculation method currently re... more >>
Problem updating from Dataset using DataAdapter to SQL server
Posted by Cyr1dian at 11/19/2005 12:00:00 AM
Hi all,
Situation:
----------
1) I've created DataAdapters to about a dozen tables in msAccess (1 =
adapter per table)
2) I've created a dataset using the visual XML designer in VS2003, addin=
g =
all the realtions=3D> results in dataset class "dsPS"
3) Retepeated step one for an ide... more >>
Prevent datagrid cell from receiving focus
Posted by Mervin Williams at 11/17/2005 10:49:50 AM
I have two columns in a datagrid - the first holds the "name" and the second
holds the "value". Only the "value column should ever receive focus. How
do I prevent focus from ever going to the first column?
Thanks in advance,
Mervin Williams
... more >>
DataGridViewComboBoxColumn where ValueMember is bind to property which type is Guid = ERROR
Posted by Oka Morikawa at 11/17/2005 12:00:00 AM
I have Custom Collection with Custom Object which has Guid as Id - I bind
DataGridView into it and it works BUT if I make one Column as
DataGridViewComboBoxColumn the trouble becomes.
If the DataGridViewComboBoxColumn ValueMember property type is Guid I get
nice error when I try to insert a... more >>
Exceptions in DataGridView when working with IBindingList
Posted by Joanna Carter [TeamB] at 11/16/2005 10:54:36 AM
I have created a class BoundList<T> class that implements IBindingList that
wraps a List<T>.
I create a List<T> and add four objects to it
I set a BindingSource's DataSource property to an instance of this
BoundList<T> class.
I then set the DataGridView DataSource to the BindingSource.
... more >>
DataBinding problem - CurrencyManager Position is always equals to -1
Posted by John Yung at 11/16/2005 10:51:34 AM
Hi,
My program binds several controls on a WinForm to a Data Table via =
CurrencyManager.=20
Example:
txtComment.DataBindings.Add("Text", _currentDS.WithholdingTax, =
"Comment");
txtComment.DataBindings[0].Parse +=3D new =
ConvertEventHandler(frmMain_Parse);
=20
....
_... more >>
DataBinding confusion
Posted by bg at 11/16/2005 12:00:00 AM
hi all,
I'm trying to do some very simple databinding, with a buttons enabled
property and a custom class and i'm a bit confused.
I have this:
class Model
{
void BindGoButton(Button b)
{
b.DataBindings.Add(Enabled,this,"ShowGoButton");
}
public bool ShowGoBut... more >>
databinding 2 datagridview
Posted by Bruno Alexandre at 11/15/2005 12:00:00 AM
Hi guys,
I have 2 questions regarding this issue:
1st. Why this code gives me the lenght of the string instead the string
itself?
Dim a As New ArrayList
a.Add(DirectCast(LProb_DataPassivos.Value.ToShortDateString, String))
a.Add(DirectCast(LProb_DescricaoPassivos.Text, String)... more >>
A quick question about DataGrid
Posted by Sowen Cheung at 11/14/2005 10:50:04 PM
Hello
How can I bind a column's value to another table?
All tables are in the dataset already, I just have two tables and I bind
table1 to the datagrid
eg)
table1
column....,level_id, level2_id,...
level_id is a FK to table2,
I want to show the level_name instead of level_id.
... more >>
"invalid attempt to read when no data is present"
Posted by Bruno Alexandre at 11/14/2005 12:00:00 AM
Hi guys...
I'm stuck!
I'm devoloping this program and everything was doing fine, until now!
This is what happends.
<my VB.NET 2.0 code>
Sub getUtenteIntoVariables(ByVal idUtente As String)
Dim conn As New SqlClient.SqlConnection(connString)
Dim cmd As New SqlC... more >>
datagrid binding basics
Posted by Stephen at 11/11/2005 12:09:52 PM
I am new to windows forms programming, having done most of my projects
in asp.net. I am working with a datagrid right now and it is giving me
fits. Basically, in asp.net I would create the datagrid and set its
events (such as OnItemCommand to add a record) to a procedure that
would execute a s... more >>
Event that fires when a new binding is added?
Posted by Benton at 11/11/2005 9:49:02 AM
Hi there,
For a Control, is there an event that fires when a new Binding is being
added to its
DataBindings collection?
Thanks in advance,
-Benton
... more >>
Controlling a DataGrid from a ListBox
Posted by AndrewDucker at 11/11/2005 3:16:41 AM
I have a form with two DataGrids ad a ListBox. The first DataGrid and
the ListBox both point to the master table. The second DataGrid points
to the child table.
If I change the record pointed to by the master DataGrid, the child
DataGrid changes the records it shows. Also, the Listbox chang... more >>
Databinding Issue with tab control
Posted by mdhaman at 11/11/2005 12:00:00 AM
In my application I retrieve a single record from the database and create a
dataset using it. The form contains a tabcontrol with serveral pages. Each
page has few controls added to it. The dataset is bound to different
textboxes on different pages. I have a "Save" button to save the changes t... more >>
EndCurrentEdit clears textboxes on my form
Posted by chrischrismeister NO[at]SPAM gmail.com at 11/9/2005 8:52:09 AM
Hello. I have a form with a number of text boxes along with a number
of buttons (Save, New, etc.). When I click on the New button I am
essentially creating a new blank row in my dataset and then binding the
dataset to my form controls. If after entering data into the textboxes
and I call ... more >>
DataBindings documentation
Posted by Peter Franks at 11/8/2005 4:26:27 PM
Is there a /thorough and exhaustive/ examination on how to effectively
use Control.DataBindings.Add()?... more >>
SQL Client Connect Timeout
Posted by Sybn at 11/7/2005 12:41:51 AM
Hi,
I have a project written in Vb . net that runs on a pocket pc. In that
project I use sql client object to connect SQL Server. In my connection
string I set connect timeout to 15 seconds. But if there is a network error
or something else it try to connect SQL Server without any exception... more >>
Bi-directional complex/simple databindings with combobox
Posted by temirov at 11/7/2005 12:00:00 AM
I'd like to bind combobox to a datasource and update a datasource whe
combobox.text property is changed.
I have a class with IBindingList interface implemented name
-BarcodeList- that consists of the items with -IEditableObject
implementation named Barcode. I also have a general class -mImag... more >>
Binding a DateTime control to a Null value
Posted by michael at 11/2/2005 7:07:03 PM
I have a table with some columns that contain SQL Server DateTime data types.
Sometimes there are null values in these fields. I want to bind a table to
some DateTime controls however there is no way to set the DateTime control to
a value of Null when necessary (I usually use 3rd party control... more >>
Datagrid, Dataview and Tablestyles
Posted by D. Ubios at 11/2/2005 8:28:01 AM
Is it not possible to define tablestyles for a datagrid bound to a dataView?
Seems theres nothing to map a style to in the tablestyles editor.
Anything, anyone?
D.U.
... more >>
How to access datagridcolumn
Posted by Mervin Williams at 11/1/2005 1:50:23 PM
Can anyone tell me how to access one of the column's DataGridColumn from a
DataRow?
Mervin Williams
... more >>
Related data in datagrid _without_ drill-down?
Posted by Jeppe Jespersen at 11/1/2005 9:59:12 AM
I have two tables: Customers and Orders.
Orders rows are related to Customer row through FK_CustomerID in the Orders
table.
I want to display orders in a dataGrid, but i want to show the Customers
NAME, not ID in the grids rows.
So an order looks like this in my grid:
OrderID Custo... more >>
|