all groups > dotnet windows forms databinding > may 2005
DataRowState is unchanged even though the dataset is changed
Posted by rjain29 NO[at]SPAM gmail.com at 5/29/2005 3:32:24 PM
On my form I have datagrid displayed and few textboxes displaying data
relevant to the particular row in the datagrid.
The Datagrid is bound to Dataview. Dataview properties - allowedit and
allownew are set to true. A textbox 'txtfirstname' is bound as :
txtfirstname("Text",datavw, "First Name... more >>
Associate an arraylist to a listview via data binding
Posted by kurotsuke at 5/25/2005 12:00:00 AM
Is there a way to associate an arraylist to a listview via
databinding? I'm working in c#. Do you have some sample code? Thanks a
lot.... more >>
Datagrid/arraylist bool shows as checkbox, except when I use my Tablestyle
Posted by Tim Nelson at 5/20/2005 3:34:54 PM
I've got a simple class (with getters/setters) that I add objects to an
arraylist and bind to a datagrid. If I don't use my own tablestyle the
default one displays bools as checkboxes. When I use my own tablestyle
by setting mappingname = "myclass[]" it displays the checkboxes as
"true" and ... more >>
Databinding and saving changes (if any) to new row
Posted by Michael Wong at 5/20/2005 12:00:00 AM
Hi there!
I am new to databinding in .Net and I think I am going to get crazy...
What I need to do is this:
1) Create a new form for the user to enter a new Product
2) Save changes (if any) when the user closes the form
But I still couldn't get what I want, even after searching in Google.... more >>
Additional white spaces in returned values
Posted by fred v via .NET 247 at 5/18/2005 2:54:36 PM
All my varchar values returned through the dataset have additional white spaces to the end.
If in my database I have firstname='fred' and lastname='ven' when I concatenate firstname and lastname value returned by the dataset I have 'fred ven '.
Does someone have an i... more >>
How to bind DataMembers (not DataSources) to custom collection classes?
Posted by William Barnum via .NET 247 at 5/18/2005 1:13:15 PM
I have created some custom collection classes that inherit=
CollectionBase and implement IBindingList, IListSource, and=
ITypedList=2E I'm no expert on the subject, but I have been able=
to create custom classes that successfully bind to data grids,=
react to ListChanged event, etc=2E All is... more >>
Use of DataRelation Class
Posted by Christopher Weaver at 5/16/2005 4:33:17 PM
I've done this (I've left out a lot of stuff like the SQL definitions):
odbcDA_TaskActivities.Fill(dsTaskActivities, "Tasks");
odbcDA_TaskActivities.Fill(dsTaskActivities, "Activity");
DataColumn parentCol;
DataColumn childCol;
parentCol = dsTaskActivities.Tables["Tasks"].Columns["uidTas... more >>
Adding a new row for editing in a separate form
Posted by Igor Dombrovan at 5/16/2005 12:00:00 AM
Hi guys
Can't figure out how to do the following:
I use a separate form for editing a row in a table. The form has its own
dataset for the edited and lookup data. Now, how do I use such a layout for
adding data ?
If I run DataSet.DataTable.AddRow() then all the constraints are evaluated
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
DataView Question
Posted by Raju Joseph at 5/15/2005 12:00:00 AM
Hi All,
My be I am missing something here. This is what I am trying to do. I have a
DataSet with 3 tables; say, Customers, Orders and OrderDetails from the
Northwind database. I have established relations between the 3 tables. I am
displaying the data in 3 separate datagrids, all working fine.... more >>
Error connected to ComboBox binding?
Posted by aualias at 5/14/2005 5:14:53 PM
I am filling a ComboBox like this...
Private Function LoadGradeTypes() As Boolean
Try
Create the data set ds with one table containing the lookup data...
' insert blank first item in the table so that the combobox will
start with a blank
Dim tbl As DataTable = ds.... more >>
Field validation and data binding
Posted by Rick at 5/12/2005 11:40:29 AM
I have a fairly typical form with some textbox controls bound to a data
table. I am processing the validating event for these controls and setting
e.Cancel depending on the outcome of my validation. Somewhere between the
control validating event and the control validated event, data binding tri... more >>
how to clear the bindingcontext of a form
Posted by silenius at 5/12/2005 12:00:00 AM
I use databinding to bind property from a class to various control on the
form.
when i change the class, i remove all the databinding but the datasource
remain in the bindingcontext, is there a way to clear the bnidingcontext?
thanks you
... more >>
Combobox databinding context not working
Posted by Rasmus.Christensen at 5/11/2005 11:59:08 PM
Hey
I have a form with som textboxes that uses databinding like this:
The "mysource" contains objects with Number, FirstName and a Type
box1Txt.DataBindings.Add("Text", mysource, "Number");
box2Txt.DataBindings.Add("Text", mysource, "FirstName");
This works find a... more >>
ReFilling a DataSet
Posted by Christopher Weaver at 5/11/2005 4:47:45 PM
If I refill a DataSet by first changing the SQL in the DA, is there
something that I need to do with the bound controls to force them to display
the new results?
... more >>
DataBindings and DataSource
Posted by Christopher Weaver at 5/11/2005 2:29:13 PM
Can anyone tell me the relationships between the following properties of a
ComboBox:
DataBindings.SelectedItem
DataBindings.SelectedValue
DataBindings.Text
DataBindings.Tag
DataSource
DisplayMember
ValueMember
It seems to me that there would be some conflict here if one were to use all... more >>
System Error
Posted by Christopher Weaver at 5/10/2005 4:32:27 PM
Anyone know what this means:
An unhandled exception of type 'System.Data.Odbc.OdbcException' occurred in
system.data.dll
Additional information: System error.
I get the first line. But is there a way to get more detail about what
happened than simply 'System error'?
... more >>
ComboBox and ListBox bound to same data source problem
Posted by TT (Tom Tempelaere) at 5/10/2005 12:00:00 AM
Hi,
On my form I have a combo box showing categories and a list box that shows
events that belong to the category shown in the combo box. I have set up a
DataSet with a Category table and an Event table, and a relation between the
two tables (using the designer). I bind the combo box to the... more >>
Binding a customized DateTimePicker control and datagrid
Posted by Lynn at 5/9/2005 11:41:05 AM
Hi, I have a situation where I have to bind a DateTimePicker control and a
datagrid to the same data source. In the DateTimePicker.Validated event, I
have to perform certain edit checks. The event fires when the user selects a
date from the calendar. That is fine. However when the user has... more >>
DataAdapter and Bad Table
Posted by Christopher Weaver at 5/9/2005 10:42:13 AM
I must have something wrong with one of my tables (the underlying data on
the server) because this code works:
cmd.CommandText = "SELECT * FROM \"tblControl\"";
and so does this:
cmd.CommandText = "SELECT * FROM \"tblTasks\"";
And likewise with any of the other tables. But this doesn'... more >>
Having a class available as a control DataBinding source
Posted by Frnak McKenney at 5/6/2005 12:00:00 AM
I posted this to microsoft.public.dotnet.framework.adonet a few days
back but wasn't able to prompt even an insulting reply. <grin> I'm
hoping to have better luck here... at least a hint on where to post
it next.
----------
Is there a way to create a data source within an application t... more >>
problem : binding textbox to custom type
Posted by Norbert Ruessmann at 5/6/2005 12:00:00 AM
Hi,
I have a custom type DBNullableInt. It is basically an Int32, which can be
null (required for database).
Then I have a Person class with property Age of type DBNullableInt.
In a form I have a textbox (Name : textBoxAge) and an instance of a Person
class. I set up data binding:
textBo... more >>
Form designers adds relations in custom dataset
Posted by Jose Antonio at 5/5/2005 2:50:51 AM
Hi,
I have coded a class which inherits from DataSets and
creates two datatables and a datarelation between them.
My intention is to drag it to a form in order to bind the
dataset to several controls.
When I drag the dataset to the form, the designer
automatically adds code in the Ini... more >>
Suspend/ResumeBinding Custom Controls
Posted by GM at 5/5/2005 12:00:00 AM
Hi,
I have a list that implements IBindingList that is bound to a custom control
(a subclass of ListBox) on the main form in my application. When the list
is added to, removed from or an item in it is edited it throws the
appropriate ListChanged event that is handled by the control which u... more >>
Moving to a Specific DataSet Row
Posted by Christopher Weaver at 5/4/2005 3:15:20 PM
Perhaps my expectations are off, but I'm thinking that I should be able to
move the row pointer in a DataSet.Table. When my user clicks on a dropdown
that displays a specific field within a DataSet.Table I would like the row
referred to to become the current row such that all of the other con... more >>
Navigating a Record Set
Posted by Asela Gunawardena at 5/3/2005 12:00:00 AM
Hi.
I need to navigate a dataset bottom-up. or in other words what a normal
foreach statement navigates the rows in a particular table from the fist
record to the last but my requirement is to navigate the rows the other way
around [from the last record to the first]. can somebody help me on t... more >>
|