Thanks.
===frmMain.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ACRMS
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}
private void miFileClose_Click(object sender, EventArgs e)
{
Close();
}
private void miFormsRegister_Click(object sender, EventArgs e)
{
// frmRegister Registration = new frmRegister();
frmRegistration Registration = new frmRegistration();
Registration.MdiParent = this;
Registration.Show();
}
private void miFormsClubs_Click(object sender, EventArgs e)
{
frmClubs Clubs = new frmClubs();
Clubs.MdiParent = this;
Clubs.Show();
}
private void miFormsLedger_Click(object sender, EventArgs e)
{
frmLedger Ledger = new frmLedger(); ;
Ledger.MdiParent = this;
Ledger.Show();
}
}
}
====frmLedger.cs
sing System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace ACRMS
{
public partial class frmLedger : Form
{
public frmLedger()
{
InitializeComponent();
}
private void frmLedger_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the
'awanaDataSet.Ledger' table. You can move, or remove it, as needed.
this.LedgerTA.Fill(this.awanaDataSet.Ledger);
}
}
}
===>frmLedger.Designer.cs
namespace ACRMS
{
partial class frmLedger
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be
disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typ eof(frmLedger));
this.statLedger = new System.Windows.Forms.StatusStrip();
this.dgvLedger = new System.Windows.Forms.DataGridView();
this.awanaDataSet = new ACRMS.AwanaDataSet();
this.LedgerBS = new
System.Windows.Forms.BindingSource(this.components );
this.LedgerTA = new
ACRMS.AwanaDataSetTableAdapters.LedgerTableAdapter ();
this.iDDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.aDateDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.descriptionDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.debitDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.creditDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.Balance = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.commentsDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.d gvLedger)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.a wanaDataSet)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.L edgerBS)).BeginInit();
this.SuspendLayout();
//
// statLedger
//
this.statLedger.Location = new System.Drawing.Point(0, 177);
this.statLedger.Name = "statLedger";
this.statLedger.Size = new System.Drawing.Size(488, 22);
this.statLedger.TabIndex = 0;
this.statLedger.Text = "statusStrip1";
//
// dgvLedger
//
this.dgvLedger.AutoGenerateColumns = false;
this.dgvLedger.ColumnHeadersHeightSizeMode =
System.Windows.Forms.DataGridViewColumnHeadersHeig htSizeMode.AutoSize;
this.dgvLedger.Columns.AddRange(new
System.Windows.Forms.DataGridViewColumn[] {
this.iDDataGridViewTextBoxColumn,
this.aDateDataGridViewTextBoxColumn,
this.descriptionDataGridViewTextBoxColumn,
this.debitDataGridViewTextBoxColumn,
this.creditDataGridViewTextBoxColumn,
this.Balance,
this.commentsDataGridViewTextBoxColumn});
this.dgvLedger.DataSource = this.LedgerBS;
this.dgvLedger.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvLedger.Location = new System.Drawing.Point(0, 0);
this.dgvLedger.Name = "dgvLedger";
this.dgvLedger.Size = new System.Drawing.Size(488, 177);
this.dgvLedger.TabIndex = 1;
//
// awanaDataSet
//
this.awanaDataSet.DataSetName = "AwanaDataSet";
this.awanaDataSet.SchemaSerializationMode =
System.Data.SchemaSerializationMode.IncludeSchema;
//
// LedgerBS
//
this.LedgerBS.DataMember = "Ledger";
this.LedgerBS.DataSource = this.awanaDataSet;
//
// LedgerTA
//
this.LedgerTA.ClearBeforeFill = true;
//
// iDDataGridViewTextBoxColumn
//
this.iDDataGridViewTextBoxColumn.DataPropertyName = "ID";
this.iDDataGridViewTextBoxColumn.HeaderText = "ID";
this.iDDataGridViewTextBoxColumn.Name =
"iDDataGridViewTextBoxColumn";
this.iDDataGridViewTextBoxColumn.Visible = false;
//
// aDateDataGridViewTextBoxColumn
//
this.aDateDataGridViewTextBoxColumn.DataPropertyNa me = "ADate";
dataGridViewCellStyle1.Format = "d";
dataGridViewCellStyle1.NullValue = null;
this.aDateDataGridViewTextBoxColumn.DefaultCellSty le =
dataGridViewCellStyle1;
this.aDateDataGridViewTextBoxColumn.HeaderText = "Date";
this.aDateDataGridViewTextBoxColumn.Name =
"aDateDataGridViewTextBoxColumn";
this.aDateDataGridViewTextBoxColumn.Width = 75;
//
// descriptionDataGridViewTextBoxColumn
//
this.descriptionDataGridViewTextBoxColumn.DataProp ertyName =
"Description";
this.descriptionDataGridViewTextBoxColumn.HeaderTe xt =
"Description";
this.descriptionDataGridViewTextBoxColumn.Name =
"descriptionDataGridViewTextBoxColumn";
this.descriptionDataGridViewTextBoxColumn.Width = 150;
//
// debitDataGridViewTextBoxColumn
//
this.debitDataGridViewTextBoxColumn.DataPropertyNa me = "Debit";
dataGridViewCellStyle2.Alignment =
System.Windows.Forms.DataGridViewContentAlignment. MiddleRight;
dataGridViewCellStyle2.Format = "N2";
dataGridViewCellStyle2.NullValue = "0";
this.debitDataGridViewTextBoxColumn.DefaultCellSty le =
dataGridViewCellStyle2;
this.debitDataGridViewTextBoxColumn.HeaderText = "Debit";
this.debitDataGridViewTextBoxColumn.Name =
"debitDataGridViewTextBoxColumn";
this.debitDataGridViewTextBoxColumn.Resizable =
System.Windows.Forms.DataGridViewTriState.False;
this.debitDataGridViewTextBoxColumn.Width = 60;
//
// creditDataGridViewTextBoxColumn
//
this.creditDataGridViewTextBoxColumn.DataPropertyN ame =
"Credit";
dataGridViewCellStyle3.Alignment =
System.Windows.Forms.DataGridViewContentAlignment. MiddleRight;
dataGridViewCellStyle3.Format = "N2";
dataGridViewCellStyle3.NullValue = "0";
this.creditDataGridViewTextBoxColumn.DefaultCellSt yle =
dataGridViewCellStyle3;
this.creditDataGridViewTextBoxColumn.HeaderText = "Credit";
this.creditDataGridViewTextBoxColumn.Name =
"creditDataGridViewTextBoxColumn";
this.creditDataGridViewTextBoxColumn.Width = 60;
//
// Balance
//
dataGridViewCellStyle4.Alignment =
System.Windows.Forms.DataGridViewContentAlignment. MiddleRight;
dataGridViewCellStyle4.Format = "N2";
dataGridViewCellStyle4.NullValue = "0";
this.Balance.DefaultCellStyle = dataGridViewCellStyle4;
this.Balance.HeaderText = "Balance";
this.Balance.Name = "Balance";
//
// commentsDataGridViewTextBoxColumn
//
this.commentsDataGridViewTextBoxColumn.DataPropert yName =
"Comments";
this.commentsDataGridViewTextBoxColumn.HeaderText = "Comments";
this.commentsDataGridViewTextBoxColumn.Name =
"commentsDataGridViewTextBoxColumn";
this.commentsDataGridViewTextBoxColumn.Visible = false;
this.commentsDataGridViewTextBoxColumn.Width = 250;
//
// frmLedger
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(488, 199);
this.Controls.Add(this.dgvLedger);
this.Controls.Add(this.statLedger);
this.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon =
((System.Drawing.Icon)(resources.GetObject("$this. Icon")));
this.MaximizeBox = false;
this.Name = "frmLedger";
this.Text = "Ledger";
this.Load += new System.EventHandler(this.frmLedger_Load);
((System.ComponentModel.ISupportInitialize)(this.d gvLedger)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.a wanaDataSet)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.L edgerBS)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.StatusStrip statLedger;
private System.Windows.Forms.DataGridView dgvLedger;
private AwanaDataSet awanaDataSet;
private System.Windows.Forms.BindingSource LedgerBS;
private ACRMS.AwanaDataSetTableAdapters.LedgerTableAdapter LedgerTA;
private System.Windows.Forms.DataGridViewTextBoxColumn
iDDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
aDateDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
descriptionDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
debitDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
creditDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn Balance;
private System.Windows.Forms.DataGridViewTextBoxColumn
commentsDataGridViewTextBoxColumn;
}
}
I've had this minimal code load the table in prior versions of both VB as
well as C#. At this stage I've done no more than insure the table is
correctly loaded before proceeding further. One record exists in this table
and it is not loaded. The bindingNav is actually greyed out and record count
is 0.
This is the data in the table to be loaded.
"ID","ADate","Description","Debit","Credit","Comme nts"
1,10/3/2008 0:00:00,"Dues",$67.00,$0.00,
"Alvin Bruney [ASP.NET MVP]" <vapor dan a t h u t ma le dut cu mwrote in
message news:26**********************************@microsof t.com...
Post your code with sample data.
--
Regards,
Alvin Bruney
Want a free copy of VS 2008 w/ MSDN premium subscription?
Details at http://msmvps.com/blogs/alvin/Default.aspx
Auther Plug
OWC Blackbook now on download at www.lulu.com/owc
"Wesley Peace" <We*********@hotmail.comwrote in message
news:Oq**************@TK2MSFTNGP05.phx.gbl...
>I hate to cross post, but I've gotten no answer yet on a problem I'm
having with visual studio 2008.
I've created a series of forms with controls to access a Access database
tables. The connection string works fine and the tables are added to the
project without a problem.
When I create the tables they appear to bind and I am able to preview the
data in the database in design mode; however, at runtime no data is
displayed and the dataviewgrids don't allow me to update the tables.
I'm currently using C#, but have tried the same application in Visual
Basic with the same results.
I've also tried re-creating the application (at least one of the windows
forms) on a different computer with the same results. Not able to display
the access tables.. As well as with SSCE as the data source.
I've checked MSDN and stepped through the Walkthroughs with no success.
Has anyone else seen this problem or provide me some guidance.