Yes, I rectify this Issue...Use Form_Load Instead of Text_Changed Event..BCoz it should assign only once.
private void Form_Load(object sender, EventArgs e)
{
try
{
SqlDataReader datareader = qu.GetValue("ITEM_CODE");
using (DataTable dt = new DataTable())
{
dt.Load(datareader);
AutoCompleteStringCollection local = new AutoCompleteStringCollection();
if (dt.Rows.Count >= 0)
{
for (int count = 0; count < dt.Rows.Count; count++)
{
local.Add(dt.Rows[count]["ITEM_CODE"].ToString());
}
}
txt_Code.AutoCompleteMode = AutoCompleteMode.Suggest;
txt_Code.AutoCompleteSource = AutoCompleteSource.CustomSource;
txt_Code.AutoCompleteCustomSource = local;
}
}
catch (Exception)
{ }
}