all groups > dotnet windows forms databinding > august 2004
Filter by week: 1 2 3 4 5
Databinding problem with inherited class
Posted by Olivier Deborne at 8/31/2004 12:49:02 PM
Hello,
I have two classes A & B
public class A : B
{
private string lastname;
public string LastName
{
get{};
}
}
public class B
{
private string firstname;
public string FirstName
{
get{};
}
}
Class A inherits from B. Whe... more >>
Binding to a dropdownlist in a datagrid
Posted by John Smith at 8/29/2004 4:20:19 AM
Ok so i've added a ddl to a datagrid in vs.net using the template controls
provide in the ide. How then do I bind that ddl to a field in an access
database. Incidently, by binding the control, that means it should drop-down
all values stored in each record or can I limit the values say by a
... more >>
problem with databinding collection to datagrid
Posted by Jeff B at 8/27/2004 12:29:55 PM
Hi
I have a collection that inherits from collectonbase, implements
IBindingList. and is serlizable.
I am binding the collection to a Datagrid using a tablestyle to limit the
data the datagrid displays. I can bind to the collection successfully.
If my collection has one object. When I click on... more >>
Bind collection to grid question
Posted by mbusfield NO[at]SPAM yahoo.com at 8/27/2004 5:29:06 AM
I have a collection of users that i want to bind to a grid.
This works fine if i just set the datasource property of the grid to
my collection.
But, the columns are not in the order i want them and i dont want to
display some of the columns, so for example, if i had the object
'User' as:
id
... more >>
Binding to a dataset created asynchronously
Posted by tim NO[at]SPAM sstechs.com at 8/26/2004 7:41:53 AM
Without to many boring details. What I am trying to do is return a
dataset object from a funtion called asynchronously. Then use that
dataset as the datasource for a datagrid.
Alright here is the boring details anyway just in case you want them.
What I have currently is the function (MergeDa... more >>
datagridboolcolumn
Posted by David Lei at 8/24/2004 5:30:45 PM
Hi,
I have a DataGrid with a DataGridBoolColumn(checkbox) column bind to a
DataSet,
mapping source type is a SQL bit data type. I want to save the
changes(checked or unchecked)
to the database.
My problem is the DataGridBoolColumn does not seem to save the "1" or "0"
value to
the DataSet... more >>
ItemChanged event does not fire
Posted by William Robinson at 8/22/2004 8:27:01 AM
I've done the example in "Microsoft Knowledge Base Article - 312045" exactly
as printed - except for changing the connection string - and the code in the
handler for the ItemChanged event never runs. The code connects to the
database, binds to the controls, and navigates properly. Everything... more >>
Updating textbox and underlying currentrow.column at the same time ?
Posted by Fred Morin at 8/21/2004 8:05:26 PM
I have a windows forms which has 2 editor controls.. A text box and a Combo
MyTextBox.Databindings.Add New Binding("value", "dsOrders",
"Orders.ContactName")
MyCombo.Databindings.Add New Binding("value", "dsOrders",
"Orders.CompanyId")
The Textbox is bound to the Contact Name and the Co... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
combobox data binding
Posted by Fanor at 8/20/2004 11:18:44 AM
Hi guys,
I tryied to bind a dataview to a combobox, but at design time I couldn't.
The combo box has a complex binding so, how can i bind to a dataview!!
Any help is very apreciated
... more >>
refresh combobox bounded on dataset
Posted by b_nursel NO[at]SPAM yahoo.de at 8/20/2004 7:19:56 AM
my combobox(cbo_Bezeichnung) is displaying data from
tbl_NCC_Gegenstaende. Now if i insert a new record in this table and i
want to refresh my combobox with this new added record is displaying
with the other records, too. How can i do it. It is very urgent.
My source code as follows:
SqlCeC... more >>
Bind TextBox to RowError or ColumnError
Posted by Ed Henn at 8/19/2004 10:45:17 AM
I have a winform app using strongly typed datasets, and I'm trying to
display errors in a column or single row without using a DataGrid, while
writing a minimum of code. I am using TextBox and ComboBox controls to
display one row at a time rather than a grid, and I already have code
that sets C... more >>
DataSet.HasChanges() always returns false even though there are changes
Posted by mzam at 8/19/2004 9:24:08 AM
Hi All,
I have a set of textboxes bound to a typed dataset (ds1). This dataset
contains one table which contains only one record.
This is an example on how I do the binding for the textboxes:
txtDescription.DataBindings.Add(new Binding("Text", ds1.ShareClass,
"Name"));
When I am about ... more >>
How to make the binding active?
Posted by Thomas Hansen at 8/18/2004 11:00:05 AM
I have a form with a TabControl with two TabPages and a TextBox control =
on each TabPage. Each of the TextBoxes are bound to a datasource like =
TextBox1.DataBindings.Add("Text", MyObject, "FirstName"). The problem is =
that the binding of the TextBox on the *second* TabPage is not active =
imm... more >>
DataGrid problem.
Posted by Integer Software at 8/17/2004 2:47:02 PM
Hi.
I have a simple datagrid on a form, bound to a database.
The dataset that the datagrid is bound to is initialized as follows:
dsBankVerbindungen1.Clear();
oleDbDataAdapter7.SelectCommand.Parameters["KTADNO"].Value = currentRecord;
//oleDbDataAdapter7.DeleteCommand.Parameters["KTADNO"].V... more >>
Reference Assembly in GAC
Posted by Steve Amey at 8/17/2004 9:54:05 AM
Hi all
I have created an assembly that I want to install in the GAC. I have created
a Strong-Name for the assembly and then used the AssemblyKeyFileAttribute to
point to the snk file. I then dragged the assembly from explorer into the
GAC and it was placed in the GAC ok.
I then go into my p... more >>
urgent:custom databinding
Posted by Ashish Sheth at 8/16/2004 12:28:53 PM
Hi Gurus,
While binding a control to a datatable I have to create a Binding object and
can specify only three properties, namely: the Property Name, data source
and data memeber. I have many controls on my form and each of this control
should be binded to the same column in the table but should ... more >>
ComboBox Databinding Problem with Text Property
Posted by Ryan Gregg at 8/16/2004 11:13:19 AM
Sorry for the cross posting, but I wasn't sure the best group to answer
this question.
I've been running my head into this bug for a while now, and I'm hoping
that someone out there has a good fix for it. It's a fairly simple bug
that really should have been caught previously, although I h... more >>
Generate windows vb.NET controls from a SQL Script
Posted by TiberianQs NO[at]SPAM yahoo.com at 8/15/2004 3:42:32 PM
I developed a small application that could be very useful for
Component One.
It generates the code to create a windows form from a SQL Script
automatically and very beautiful. All the controls are Component One
Studio Input, (Input date, Textbox, NemricEdit, etc), all are
formatted and create... more >>
Binding objects that contain other objects
Posted by Dan at 8/15/2004 3:19:57 AM
Hi Everyone
Is it possible to bind an object that contains other objects to a datagrid.
For example if I have a person object which exposes as a property an address
object, is it possible to bind this to a datagrid, say the name property of
the person object and the city property within the ... more >>
How to add databinding to my user defined control?
Posted by davorka77 NO[at]SPAM hotmail.com at 8/12/2004 3:23:28 AM
I have made my control and I want to show data from base. How can I do that?
Thanks,
Dada... more >>
Adding a new record
Posted by John at 8/11/2004 3:12:17 PM
Hi
I have a set of fields which I have bound to properties from a class. I am
not using any context manager or anything like that, simply fields bound to
the datasource. How can I add a new record on this form via code?
Thanks
Regards
... more >>
VB & SQL 2005
Posted by Pedro Ayensa at 8/11/2004 3:00:58 PM
Hi, I'm bounding a DataNavigator to a DataSet (through DataConnector). The
SQL database is stored in the app folder, and referenced to there. But at
run-time the App trys to link the DB from VStudio folder and I get this
message:
"An attempt to attach an auto-named database for file C:\Archivo... more >>
MasterDetail Datagrid and Dataviews
Posted by dfjhsqd at 8/11/2004 10:03:26 AM
Hi all
I have a form with 2 datagrids (master-detail)
and a combobox to create a filter for the masterdatagrid.
The master-detail worked fine when i used a dataset like this :
drelRelation = New DataRelation _
("drelMasterDetail", dsMasterDetail.Tables("tblMaster").Columns("ID"), _
dsMas... more >>
Need help with Databinding and Windows User Controls
Posted by data NO[at]SPAM im.ns.ac.yu at 8/11/2004 5:50:38 AM
Hi all;
I have created an Windows Forms user control in C# and need to enable
it for data binding. How do I implement properties such as DataSource,
DataMember and DataField? Can someone be so kind to provide some
sample code?
Thanks,
Djordje... more >>
Re-databinding with new DataSet object...
Posted by Nathan Baulch at 8/10/2004 8:23:15 PM
Every time my form is opened, it is given a brand new DataSet object.
This means that I need to realign all of my data bindings to a new object
each time the form is opened.
Unfortunately the ControlBindingsCollection indexer is readonly, as is all
the Binding object's properties.
This means I ... more >>
Repost: Problem binding a byte[] property to an Access database
Posted by Rhy at 8/10/2004 1:35:17 PM
Hi All -
I'm using C# and Visual Studio to create an app. My app has a UserControl
(self-built) which exposes a byte[] property. I would like to bind this
property of the control to an Access database. Currently, the database has
only two fields, a text field and a memo field. I am tryi... more >>
Problem binding a byte[] property to an Access database. [Format event]
Posted by Rhy Mednick at 8/6/2004 5:28:31 PM
Hi All -=20
I'm using C# and Visual Studio to create an app. My app has a =
UserControl (self-built) which exposes a byte[] property. I would like =
to bind this property of the control to an Access database. Currently, =
the database has only two fields, a text field and a memo field. I a... more >>
Datagrid sort programmatically
Posted by Nancy. at 8/5/2004 1:22:22 PM
Hello:
I can sort the header column when the grid is display, but
how could I programmatically sort a header column in my
datagrid?
Thanks!
... more >>
ComboBox setting null value when item changed
Posted by TEK at 8/5/2004 11:04:08 AM
Hello
I'm filling a combo box (DropDownStyle = DropDownList) by setting the
datasource to a object list.
When the user selects an object from the list I want a related object to be
updated with the selected value.
This is almost working, code shown below;
_cmbMargin.DataSource = _post.Marg... more >>
Unbound columns
Posted by Heinz Timmer via .NET 247 at 8/5/2004 1:55:42 AM
Hi,
i would have some bound and unbound columns in my DataTable,
means the rows with bound column values should be updated to the database and
rows with unbound column values are calculated and should not be updated to the database;
the update mechanism runs by the dataadapter, so all rows of... more >>
How do I prevent mutiple CurrencyManagers being created?
Posted by runningdog at 8/4/2004 7:53:43 PM
How do I prevent mutiple CurrencyManagers being created?
I have a user control which contains a TextBox and a DataGrid, I am binding
these programtically to a dataset passed as a property. My user control work
fine but other bound TextBoxes (bound with the designer) on the same form
are not sy... more >>
Howto syncronise the BindingContext with a row found with the Find method.
Posted by runningdog at 8/3/2004 5:25:59 PM
Hi,
I'm stuck trying to syncronise the BindingContext with a row I have just
found in the Dataset that I bind to.
I.E.
' This will position the form to a row in the dataset
Me.BindingContext(DataSourceRef, DataTableRef).Position = pos
' This will return a row in the dataset
row = Data... more >>
multiline text in databinding to textbox control
Posted by Etai Margolin at 8/3/2004 12:25:15 PM
Hi,
I'm trying to pass a multiline string to a textbox control using
databinding, but what I end up with is a string with "\r\n" in it.
Using this.textbox.Text = "line1\r\nline2" works, but the same string using
databinding doesn't.
Any ideas ?
Thanks,
Etai
... more >>
Bound controls changing .text problem
Posted by Maurice Mertens at 8/3/2004 3:09:58 AM
Hi,
a question about bound controls on the form:
I'm having a form with bound controls, i.e. Data1, Data2, Data3. When the
user changes the value in Data1 the values in Data2 and Data3 need to be
calculated and entered automaticaly.
I tried to use code like this:
me.Data2.text = clng(... more >>
Datatable, primary key, bound controls
Posted by Maurice Mertens at 8/2/2004 5:05:53 AM
Hi,
I'm using an Access DB with a table that has a primary autonumber field,
i.e. [OrderID]. I created a form with bound controls on it.
When I add a new record in the datatable row(1) gets an OrderID which is
the same as in row(0). The problem is that when I'm adding this new record
I ... more >>
binding datagrid to property hierarchy e.g. "Pet.Name"
Posted by JerryShea at 8/2/2004 4:21:01 AM
I'd like to display top level properties and also second level properties in my datagrid. This is easier to explain with an example. Given these two classes:
class Animal {
public string Name {
return "Rex";
}
}
class Person {
public Animal Pet {
return new Pe... more >>
|