TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Malvika Dave
NA
1
644
how to filter records from listbox without using sql stateme
May 28 2016 3:14 AM
i want to filter items from listbox as some character typed in combobox ??
suppose when i type "M" in combobox then listbox filter its itemlist which contains
"M" in C# without using SQL STATEMENT...
below is my code.....
private void FillListBoxes()
{
int count = FillList.Rows.Count;
for (int k = 1; k <= count; k++)
{
var itemList = lbSearch.Items.Cast<String>().ToList();
if (count > 0)
{
lbSearch.Items.Clear();
//filtertheitemsandaddthemtothelist
lbSearch.Items.AddRange(itemList.Where(i => i.Contains(cStockTypeName.Text)).ToArray());
lbSearch.Items.Add(FillList.Rows[k]["CatName"].ToString());
}
}
Reply
Answers (
1
)
filter listbox's item list with out use of SQL STATEMENT...
How to fetch data from mysql database in a specific way C# ?