S
Si2323
Guest
Problem getting Account Master Header Data
Source:mscorlib
Description: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name:index
Stack Trace: at System.Collection.ArrayList.get_Item(Int32 index) at System.Windows.Forms.DataGrid.ViewRowCollection.SharedRow(Int32rowIndex)
at System.Windows.Forms.DataGridViewRowCollection.get_Item(Int32 index)
at PgMgmt.frmMain.OnLoad(EventArgs e)
code
// Load AccountMaster Header Data
try
{
var accountMastersBindingList = new BindingList<AccountMaster>(_accountMasters);
this.AccountMastersBindingSource.DataSource = accountMastersBindingList;
accountMasterDataGridView.DataSource = this.AccountMastersBindingSource;
accountMasterDataGridView.Rows[0].Selected = true;
DataGridViewRow rowAccountMaster = accountMasterDataGridView.SelectedRows[0];
LoadGroups();
groupMastersDataGridView.Rows[0].Selected = true;
DataGridViewRow rowGroupMaster = groupMastersDataGridView.SelectedRows[0];
String groupMasterID = rowGroupMaster.Cells[0].Value.ToString();
LoadCoverages();
}
catch (Exception ex)
{
MessageBox.Show("Problem getting Account Master Header Data\r\n" + "Source: " + ex.Source + "\r\n" + "Description: " + ex.Message + "\r\n" + "Stack Trace: " + ex.StackTrace);
}
Continue reading...
Source:mscorlib
Description: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name:index
Stack Trace: at System.Collection.ArrayList.get_Item(Int32 index) at System.Windows.Forms.DataGrid.ViewRowCollection.SharedRow(Int32rowIndex)
at System.Windows.Forms.DataGridViewRowCollection.get_Item(Int32 index)
at PgMgmt.frmMain.OnLoad(EventArgs e)
code
// Load AccountMaster Header Data
try
{
var accountMastersBindingList = new BindingList<AccountMaster>(_accountMasters);
this.AccountMastersBindingSource.DataSource = accountMastersBindingList;
accountMasterDataGridView.DataSource = this.AccountMastersBindingSource;
accountMasterDataGridView.Rows[0].Selected = true;
DataGridViewRow rowAccountMaster = accountMasterDataGridView.SelectedRows[0];
LoadGroups();
groupMastersDataGridView.Rows[0].Selected = true;
DataGridViewRow rowGroupMaster = groupMastersDataGridView.SelectedRows[0];
String groupMasterID = rowGroupMaster.Cells[0].Value.ToString();
LoadCoverages();
}
catch (Exception ex)
{
MessageBox.Show("Problem getting Account Master Header Data\r\n" + "Source: " + ex.Source + "\r\n" + "Description: " + ex.Message + "\r\n" + "Stack Trace: " + ex.StackTrace);
}
Continue reading...