weixin_33733810 2015-02-23 11:19 采纳率: 0%
浏览 29

动态过滤列表

I have the following data in the table:

ID Category Product
1  Shoes     Puma
2  Shoes     Nike
3  Computer  Acer
4  Shoes     Woodland
5  Computer  Lenovo
6  Shoes     Reebok

There is a one textbox for Productcolumn and dropdown for Category column in the heade. Dropdown has two values: Computer and Shoes. The Requirement is to filter this list dynamically when user types in textbox i.e on keypress event. Eg if user types 'e', then 2nd, 3rd and 6th row should be shown. If user types another word 'r', then only 3rd row should be shown as the Product name contains 'er' in the string. I have written the textchanged event for the textbox which filters the list but it happens when focus from textbox is lost not on each key press.

How can this be achieved in .net 2.0?

  • 写回答

0条回答 默认 最新

    报告相同问题?