I am using infragistics .Net advantage v11.1 When the user types the first letter of the main column in UltraListView, it rotates the selection between all items starts with that letter.
However, you have to type the letter incredibly slow! It seems difficult to wait for a while before each keystroke.
i.e.: If I have 3 items in the list starts with alphabet 'A' and I keep pressing 'A' to navigate between items starts with 'A'. Most of the time, auto search will look of items starts with ‘AA’ instead of ‘A’ if I press the keys a little faster. How can I change speed or interval for each keystroke for auto search?
Hello jmuraleedharan,
The mentioned behavior is by default and expected, because by this way you could search for items that Start with double "aa" . If you want to change the mentioned behavior you could handle ultraListView1_KeyPress() event and include the code below:
private void ultraListView1_KeyPress(object sender, KeyPressEventArgs e) { ItemCounter++; var ItemList = from items in ultraListView1.Items.Cast<UltraListViewItem>() select items; var SearchList = ItemList.ToList(); if (SearchList[ItemCounter-1].Text.StartsWith(e.KeyChar.ToString()) && ItemCounter < SearchList.Count ) { ultraListView1.ActiveItem = SearchList[ItemCounter]; } else { ItemCounter = 0; ultraListView1.ActiveItem = SearchList[ItemCounter]; } }
private void ultraListView1_KeyPress(object sender, KeyPressEventArgs e)
{
ItemCounter++;
var ItemList = from items in ultraListView1.Items.Cast<UltraListViewItem>()
select items;
var SearchList = ItemList.ToList();
if (SearchList[ItemCounter-1].Text.StartsWith(e.KeyChar.ToString()) && ItemCounter < SearchList.Count )
ultraListView1.ActiveItem = SearchList[ItemCounter];
}
else
ItemCounter = 0;
Please note that I set property AutoKeyboardSearch to False. For more details you could take a look at the attached sample. Let me know if you have any questions
Regards