Exception from HRESULT: 0x800A017D (CTL_E_INVALIDPROPERTYARRAYINDEX)
Hi...
I am working on desktop application.
I want to search multiple records in AxMSFlexGridLib but following Exception is happening..
Exception from HRESULT: 0x800A017D (CTL_E_INVALIDPROPERTYARRAYINDEX)
at the fallowing line which is bold.....
public void SearchInvoice(long invoice)
{
this.table = this.dsdata.Tables[3];
if (this.table.Rows.Count >= 1)
{
this.row = this.table.Rows[0];
this.lblinvoice.Text = Convert.ToString(this.row["invoiceno"]);
this.txtname.Text = Convert.ToString(this.row["Name"]);
this.txtptcl.Text = Convert.ToString(this.row["Phone"]);
this.txtcast.Text = Convert.ToString(this.row["Cast"]);
this.txtarea.Text = Convert.ToString(this.row["Area"]);
this.txtdescript.Text = Convert.ToString(this.row["Description"]);
if (this.txtebo.Items.IndexOf(Convert.ToString(this.row["EBO"])) >= 0)
{
this.txtebo.SelectedItem = Convert.ToString(this.row["EBO"]);
}
else
{
this.txtebo.Items.Add(Convert.ToString(this.row["EBO"]));
this.txtebo.SelectedItem = Convert.ToString(this.row["EBO"]);
}
}
this.table = this.dsdata.Tables[4];
if (this.table.Rows.Count >= 1)
{
this.row = this.table.Rows[0];
this.lblinvoice.Text = Convert.ToString(this.row["Invoice"]);
this.txtname.Text = Convert.ToString(this.row["Name"]);
this.txtptcl.Text = Convert.ToString(this.row["Phone"]);
this.txtcast.Text = Convert.ToString(this.row["Cast"]);
this.txtarea.Text = Convert.ToString(this.row["Area"]);
this.txtdescript.Text = Convert.ToString(this.row["Description"]);
}
try
{
int num3;
int num5;
int num6;
this.table = this.dsdata.Tables[5];
if (this.table.Rows.Count >= 1)
{
this.row = this.table.Rows[0];
this.lblinvoice.Text = Convert.ToString(invoice);
this.txtcode.Text = Convert.ToString(this.row["CCode"]);
int num = Convert.ToInt32(this.txtcode.Text);
int num2 = this.txtcode.Text.Length;
this.txtcode.Text = "";
for (int i = 1; i <= (6 - num2); i++)
{
this.txtcode.Text = this.txtcode.Text + Convert.ToString(0);
}
this.txtcode.Text = this.txtcode.Text + Convert.ToString(num);
}
this.table = this.dsdata.Tables[2];
if (this.table.Rows.Count >= 1)
{
num3 = 1;
foreach (DataRow row in this.table.Rows)
{
this.flex2.set_TextMatrix(num3, 1, Convert.ToString(row["ItemName"]));
this.flex2.set_TextMatrix(num3, 2, Convert.ToString(row["length"]));
this.flex2.set_TextMatrix(num3, 3, Convert.ToString(row["neck"]));
this.flex2.set_TextMatrix(num3, 4, Convert.ToString(row["chest"]));
this.flex2.set_TextMatrix(num3, 5, Convert.ToString(row["waist"]));
this.flex2.set_TextMatrix(num3, 6, Convert.ToString(row["Hip"]));
this.flex2.set_TextMatrix(num3, 7, Convert.ToString(row["ShoulderShape"]));
this.flex2.set_TextMatrix(num3, 8, Convert.ToString(row["sleeves"]));
this.flex2.set_TextMatrix(num3, 9, Convert.ToString(row["cuff"]));
this.flex2.set_TextMatrix(num3, 10, Convert.ToString(row["Elbow"]));
this.flex2.set_TextMatrix(num3, 11, Convert.ToString(row["armhole"]));
num3++;
}
}
this.table = this.dsdata.Tables[1];
if (this.table.Rows.Count >= 1)
{
num3 = 1;
foreach (DataRow row2 in this.table.Rows)
{
num5 = 2;
num6 = 1;
while (num6 <= 9)
{
this.flex3.set_TextMatrix(num3, num6, Convert.ToString(row2[num5]));
num5++;
num6++;
}
num3++;
}
}
this.table = this.dsdata.Tables[0];
if (this.table.Rows.Count >= 1)
{
num3 = 1;
foreach (DataRow row3 in this.table.Rows)
{
num5 = 2;
for (num6 = 1; num6 <= 7; num6++)
{
this.flex1.set_TextMatrix(num3, num6, Convert.ToString(row3[num5]));
num5++;
}
this.flex1.set_TextMatrix(num3, 9, Convert.ToString(row3[10]));
this.flex1.set_TextMatrix(num3, 10, Convert.ToString(row3[11]));
this.flex1.set_TextMatrix(num3, 11, Convert.ToString(row3[9]));
this.flex1.set_TextMatrix(num3, 8, Convert.ToString(row3[12]));
num3++;
}
int num7 = 0;
for (int j = 1; j < this.flex1.Rows; j++)
{
if ((this.flex1.get_TextMatrix(j, 11).Length != 0) && (this.flex1.get_TextMatrix(j, 6).Length > 0))
{
num7 += Convert.ToInt32(this.flex1.get_TextMatrix(j, 6));
}
}
this.txtQTY.Text = Convert.ToString(num7);
}
this.table = this.dsdata.Tables[3];
this.row = this.table.Rows[0];
this.gpcourier.Visible = true;
this.chkcourier.Checked = true;
this.txtreciept.Text = Convert.ToString(this.row["RecNo"]);
this.txtcompany.Text = Convert.ToString(this.row["CompanyName"]);
this.txtreciver.Text = Convert.ToString(this.row["ReciverName"]);
this.dbname = this.row["DeliverByName"].ToString();
if (Convert.ToInt32(this.txtcompany.Text.Length) <= 0)
{
this.gpcourier.Visible = false;
this.chkcourier.Checked = false;
}
if (Convert.ToString(this.row["Complementry"]) == "Complementry")
{
this.chcomple.Checked = true;
}
if (Convert.ToString(this.row["PaymStyle"]) == "Cash")
{
this.rdcash.Checked = true;
}
else
{
this.rdcredit.Checked = true;
}
this.txtBooking.Value = Convert.ToDateTime(this.row["BookingDate"]);
this.txtDelivery.Value = Convert.ToDateTime(this.row["DeliveryDate"]);
this.txtamount.Text = Convert.ToString(this.row["Amount"]);
this.txtAdvance.Text = Convert.ToString(this.row["Advance"]);
this.txtbalance.Text = Convert.ToString(this.row["Balance"]);
if ("Urgent" == Convert.ToString(this.row["Urgent"]))
{
this.chkurgent.Checked = true;
this.Urgent = "Urgent";
}
if (Convert.ToString(this.row["DeliveryType"]) == "Courier")
{
this.rdcourier.Checked = true;
}
else if (Convert.ToString(this.row["DeliveryType"]) == "hand")
{
this.rdhand.Checked = true;
}
else
{
this.rddrycleaner.Checked = true;
}
}
catch (Exception exception)
{
MessageBox.Show(exception.Message,"Error!");
}
//this.setnotifier();
}
please any body help me....