From: Denny on
Hi,
I have an issue which is relatively in all the comboboxes I'm using in my
application. I'm using .net CF 3.5 on windows mobile 5, the device is an ipaq
hx2790b.

My combobox is loaded from a dataset, using the combobox.Items.Add, method
and then the selectedindex is seto to 0, everything works fine until I
started scrolling the combobox. This issue is very random(it dosent occur
always ,but quite often).
If i press the upper arrow control on the dropdown some times the cotrol
stays in the pressed state even after I stopped tapping, and the list end up
scrolling to the start, same happens with the bottom arrow.
Sometimes if I pressed the arrrows and release it, it scrolls the list till
i press the button, and automatically scrolls back to shere it was previous,
instead of staying at the position where I left the thumb.

Please help me to fix this , since it becomes an issue for my client.

here is a snippet of code which does the filling of the combo
datarow = MyApp.fs.m_Db.GetDataSubSet("Positions", "User='" +
MyApp.fs.m_user + "'", "PositionDesc ASC", false);
if ((datarow != null) && (datarow.Length != 0))
{
foreach (DataRow r in datarow)
{
String posDesc = r["PositionDesc"].ToString();
posDesc = posDesc.Trim();
if (posDesc.Length != 0)
{
if
(cmbWrkInfoPositionID.Items.Contains(posDesc) == false)
{

cmbWrkInfoPositionID.Items.Add(r["PositionDesc"].ToString());
cmbWrkInfoPositionID.SelectedIndex = 0;
}
}

}
//add an empty record to the end to exclude position
selection
cmbWrkInfoPositionID.Items.Add("");
}
else
{
cmbWrkInfoPositionID.Enabled = false;
}
I set the style of the combobox as dropdownlist

Thanks
Denny

 | 
Pages: 1
Prev: this.Font
Next: Changing File Attributes in CF