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
harry code
NA
124
22.8k
KeyPress event in ComboBox
May 11 2018 4:02 AM
Hi,
I am working on Combobox.
I need to search by typing the character in the combobox by using linq.
I am using a gridview to display the data fro a table.
i have written the following code under ComboBox_KeyPres event
{
string combotext = comboBox1.Text;
dataGridView1.DataSource = from em in dc.emps where em.dept.Contains(combotext ) select em;
}
once i enter the character like 'A','D' etc the value is not getting stored in the variable Combotext.
after the keypress event is completed the value is getting stored into the variable.
I want the value to stored immediately after entering it into the Combobox.
Thank you
Reply
Answers (
2
)
Object reference not set to an instance of an object.
website open in different way in different browser