all groups > dotnet windows forms databinding > march 2005
Filter by week: 1 2 3 4 5
Can't add a record to Access DB - "Column xxx does not allow Nulls"
Posted by MrMibs via DotNetMonster.com at 3/31/2005 10:52:35 PM
I'm trying to use a form created with the VB.NET Data Form Wizard. When I
try to test the form by adding data, I get the above error message (the
record does not get added and it erases a non-related field!).
The value in the field is not a NULL value. This seems only to happen to
key fields - n... more >>
OnSetComplete, OnSet methods do not fire
Posted by samwise1130 at 3/30/2005 1:33:19 PM
I have an object and a strongly typed collection (inheriting
collectionbase) of that object.
The collection also implements iBindingList.
I am attempting to run some of my own code in the OnSet or the
OnSetComplete methods. But when I put a breakpoint in those events, I
do not seem to hit t... more >>
Textbox bound to Dataset row, After editing HasChanges return fals
Posted by N.Sheffer at 3/30/2005 7:25:02 AM
I created a form that is displayed as DialogBox for the user. The form has
couple of Textbox that are bound to the Dataset and shows the current value
in them correctly.
"
TextBox1.DataBindings.Add("Text", DS, "TableName1.FieldName1");
TextBox2.DataBindings.Add("Text", DS, "TableName1.FieldNa... more >>
Databinding in VB.Net: Errors in debug mode but the application is working!
Posted by Sam Downunder at 3/30/2005 6:37:42 AM
Hi
I have an application that has in memory tables which are related. I
have recently upgraded to 2003 MSDN - which seems to have thrown an
error which I did not have before.
Here is the scenario...
First I build a couple of simple tables:
______________________________________________... more >>
datagrid and textbox
Posted by mf_sina at 3/26/2005 10:49:12 AM
Hi!
I have a datagrid bound to a dataset and also i have a textbox bound to the
same dataset.
when i navigate in my datagrid i want the textbox also navigate
automatically with my datagrid because textbox is using the same dataset as
it's datasource.
for example when i go to record number 1... more >>
Data Binding and validating data
Posted by post.messages NO[at]SPAM gmail.com at 3/26/2005 12:01:00 AM
I have a few issues with databinding.
First of all, I read so much about how painful it seemed to be for
people that I initially started out not using it. As in, if I do
things manually, at least I know what is going on.
However, I liked what I read about the ErrorProvider and the
SetRowErr... more >>
Performance with DataSet: suggestions for best practices?
Posted by Chris Zopers at 3/25/2005 1:47:39 AM
Hello,
I've developed a lot of database-systems in Microsoft Access. Now I'm
going to develop a large system in VB.NET. Before I start, I'm testing
some performance differences between MS Access and VB.NET. When I
connect to a large table (more than 100.000 records) from a database
with MS Ac... more >>
Lock/Stop/Restrict entry when combo box is bound.
Posted by flat_ross NO[at]SPAM yahoo.com at 3/23/2005 9:23:31 AM
I have been unable to google the right keywords to this hopefully easy
answer.
I bind a combobox:
With cboOperator
Dim operator As OperatorDataTable = _company.Operator
.DataSource = operator
.DisplayMember = operator.Name.ColumnName
.... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Datagrids - Rows???
Posted by Darryn Ross at 3/23/2005 12:00:00 AM
Hi
How do i set a row readonly after applying custom table styles and binding
to a datasource??
i need to set particular rows readonly, but i do not know what they are
until i have loaded data from my tables.
Regards
Darryn
... more >>
System.IndexOutOfRangeException
Posted by João Santa Bárbara at 3/22/2005 4:51:42 PM
hi all, i have this error anyone knows how to solve it ???
thks
JSB
at System.Windows.Forms.CurrencyManager.get_Item(Int32 index)
at System.Windows.Forms.CurrencyManager.get_Current()
at System.Windows.Forms.ErrorProvider.ErrorManager_CurrentChanged(Object
sender, EventArgs e... more >>
Binding my Blob to a Picturebox
Posted by Craig Muckleston via DotNetMonster.com at 3/21/2005 9:52:43 PM
I have a picturebox on my windows form. In this picturebox I'm going to
keeppictures of the employees. I can save the images to my access table
(tblPhoto.PhotoObject)
I want to be able to populate my picturebox with the image of the employee.
How can I go about binding it, or having the image ... more >>
Databinding with CustomControl
Posted by Claudio Grazioli at 3/21/2005 3:57:54 PM
Hi
I have a NullableDateTimePicker control inherited from DateTimePicker
control (windows forms). The NDTP has a property SmartDate of the type
SmartDate (SmartDate is a class enhancing DateTime with a Nullable
functionality).
I have a business object name Project with several properties, ... more >>
Bind a data grid column to an element of a collection?
Posted by Paul Bartlett at 3/18/2005 4:08:41 PM
[Reposted here as probably more appropriate than
"microsoft.public.vb.controls.databound"]
Could anyone help with the following scenario?
- I have a class that exposes a collection (a Hashtable actually) as a
property.(called Custom).
- I am custom binding a WinForms DataGrid control to a c... more >>
Getting column widths in an untyped dataset
Posted by Erwin Pant via DotNetMonster.com at 3/18/2005 3:11:34 PM
Hi,
I already sent this question however I can't seem to find it so I'm gonna
submit it again.
I'm populating .dbf and access tables into my datasets. These files are
coming from clients so the layouts always change therefore I can't rely on
using typed datasets. Is there a way of getting... more >>
Displaying fields from 2 tables in one DataGrid
Posted by David K. at 3/18/2005 2:46:36 AM
Hi,
I am using C# with VS Studio 2003.
I would like to display in one DataGrid control (Windows Forms) a
combination of fields that are selected from 2 tables.
My questions are:
1. How can it be performed, using DataAdapter and DataSet?
2. How can it be performed, using Typed DataSet?
A det... more >>
Calling Stored Procedures
Posted by Erwin Pant via DotNetMonster.com at 3/17/2005 10:32:38 PM
Hi,
I know in .NET in order to call a stored procedure passing parameters, you
have to add parameters to the SqlParameter collection. I want to know if
there is a way to call stored procedures in this format:
Command.Execute StoreProc Par1, Par2, Par3, Par4, Par5
This is how I was doing ... more >>
DataGrid Control
Posted by Bill S. at 3/17/2005 4:16:36 PM
Hi,
I'm using a DataGrid with a master/detail setup. I allow navigation, so the
grid has the little "plus boxes" and the link to the child table. Can
anybody tell me how to setup custom GridColumnStyles. I try the various
DataSources such as the relation and so forth, but I can only customize... more >>
How to add selected columns of a Dataset to a datagrid
Posted by Neelakshi Joshi via .NET 247 at 3/16/2005 2:39:04 PM
Hi,
I am using Visual Studio 2003. I was wondering how can I display only some of the columns of a dataset in a datagrid. For example, if my dataset has columns A,B,C,D and I want to display only columns A and C.
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com... more >>
Unable to bind untyped dataset to textboxes, anyone done this?
Posted by Håkon_Eide at 3/15/2005 11:35:52 AM
I have a dataTable with only one unique record and want to bind this to
a couple of textboxes in a form, so that when a user changes a value,
it's eventually reflected back to the database.
The dataset I use is 'untyped' - so I'm not able to do a typed databind,
and this is causing me great... more >>
Bind Enum to a data bound combo
Posted by Nick Chakarov at 3/15/2005 10:38:51 AM
Anybody knows how to bind enumerated type to a data bound combo box?
I tried this:
this.comboBox1.DataSource = Enum.GetValues(typeof(CheckType));
this.comboBox1.DataBindings.Add("SelectedItem",this.objtest.Tables["Attribute"],"CheckType");
When i navigate records the combo didnt reflect the val... more >>
Databinding with DataView - AllowEdit not working
Posted by burn_mcdonalds NO[at]SPAM hotmail.com at 3/15/2005 10:17:20 AM
Hi,
I am creating a new dataview with from my dataset like so:
mydv = New DataView
mydv = ds.Tables("table1").DefaultView
then I bind my combo box to one of the fields:
cbo.DataBindings.Add("SelectedValue", ds, "field1")
This works fine, however when i set the dataview AllowEdit prop... more >>
How to share data source instance among several windows forms
Posted by Ferag Leittechnik at 3/14/2005 2:21:02 AM
I have a typed DataSet which holds my application data. I use it for data
binding in several forms. When setting the DataSet as a data source in my
form the UI designer generates code which creates a new instance of my
DataSet. So each form is referring to an own instance which's not my
inte... more >>
binding custom class to textbox
Posted by Selvad at 3/9/2005 7:05:43 PM
i have a class like:
public class MyClass
{
public MyClass() {}
public SecondClass SC=new SecondClass ();
}
public class SecondClass
{
public SecondClass () {}
public string test="";
}
i'd lik to bind DC.test to a textBoxt. I've tried :
MyClassMC=new MyClass();
textB... more >>
Dataview multiple rowfilter Problem
Posted by mf_sina at 3/8/2005 9:20:38 AM
Hi!
is it possible to set Rowfilter property to multiple fields such as this:
dataview1.rowfilter = "Customer = " & "'" & me.txtcustomer.text & "'"
dataview1.rowfilter = "Order_ID = " & "'" & me.txtOrder_ID.text & "'"
dataview1.rowfilter = "orderd_Item = " & "'" & me.txtorderd_Item.text & "'"
... more >>
Binding to checkbox and getting imediate results
Posted by Paul Brown at 3/7/2005 5:44:51 PM
I have a simple object with some boolean properties which I've databound to
some checkboxes, these in turn affect a text control which is also bound and
this all works after a fashion.
What I want it to be able to do is to change the text whenever a checkbox is
selected, not when a check box l... more >>
Unwanted column shown in datagrid
Posted by Microsoft at 3/6/2005 7:47:02 PM
All,
I have a custom object that inherits from CollectionBase.
When I set my datagrid.datasource property to this data grid I get the
fields I want, however the count property of the CollectionBase object is
shown as well.
I am sure I need to explicitly define which columns I would like... more >>
Problem using Composite Key...
Posted by Ashwin Murali. T at 3/5/2005 3:05:47 PM
I have a table called orderdetails which has a composite key. It is made
of OrderID+ItemCode.
The OrderID comes from the Orders table and the ItemCode comes from the
Items table.(Foreign Key Constraints)
I have a winform application where i have a combobox which displays the
OrderID from ... more >>
How to display lookup field in DataGrid
Posted by Kamal Ahmed at 3/4/2005 11:24:42 AM
Hi, All
I have a datagrid binded to a datasource. I want to display a lookup field
in the same grid. I also want to display a calculated field in datagrid i.e.
Qty x Rate (Amount). How is it possible.
TIA
... more >>
sqlDataAdapter, SQl Server - why two connections
Posted by Adam at 3/3/2005 9:27:03 AM
I have built a very simple single form Application, with a sqlDataAdapter,
sqlConnection, dataSet and a Grid. As soon as I load the application and bind
the data there are two connections from my App in SQL Server.
Can anyoone explain why this is, and if this means my App will take up two
l... more >>
Change value to control binded
Posted by maurorog NO[at]SPAM libero.it at 3/3/2005 2:55:46 AM
I have this problem.
I have bind a textbox and if I write with keyword a text, it's saved
correctly, but if I change the value by programs es.
textbox1.text="aaaa"; the value isn't save.
Why ?
What happened of different when I write in a textbox or change the
value from program ?
thanks
... more >>
Binding to UserControl causes HasChanges to be True in the Dataset even though no changes made
Posted by Pete Hearn at 3/2/2005 8:00:16 PM
Hi All,
I have a very simple User Control containing a textbox and label control. I
expose a ControlText and LabelText property to allow the control's contents
to be set as well as the label's text (which is simply a caption for the
textbox).
When I bind the ControlText property to a DataS... more >>
Valuemember/Displaymember vs. Delegates
Posted by cody at 3/2/2005 2:31:56 PM
I do not think it is good style to use these because you have to hardcode
the propertynamed in your code as string literals. Wouldn't it be better to
use delegates instead?
myComboBox.DisplayMember = new ReturnStringDelegate(myObj.Name);
myComboBox.Valuemember = new ReturnObjectDelegate(myObj.... more >>
Multiple datatables in one view
Posted by Wayne Scott at 3/2/2005 1:53:34 PM
Does anybody know if it's possible to use a a view, or
something like it, to pull together columns from
different datatables into one view to bind to a
datagrid? ... more >>
error when binding a checkbox and DBNull
Posted by petro at 3/1/2005 4:37:02 PM
When I try to bind a checkbox and the data for the field is null I get an
error 'Object cannot be cast from DBNull to Other types'. Also when I use
AddNew I also get the same error. I must allow for 0, 1 or null data.
My code is as follows:
ckActive.DataBindings.Add(new Binding("checked", ... more >>
TextBox
Posted by HungTrinh at 3/1/2005 10:19:36 AM
Hi All,
I bind a Textbox with a datarow. When I update the value of a field in
datarow, the new value doesn't automatically display in the Textbox. Could
you tell me how to solve this problem;
Ex:
txtSoftwareSN.DataBindings.Add("Text", row, "SoftwareSN"); //
DataRow row
... more >>
|