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
mohit singh
NA
64
1.9k
Extract similar data from text file as input in the textbox
Apr 17 2020 3:21 AM
I want to extract the input data in text box from text file and want to display the result in datagrid.
i am using textbox for userentry, a button for loading the requirement and datagrid to fill the requirement and display ...
private
void
Button_Click(
object
sender, RoutedEventArgs e)
{
{
string
var;
var = tb.Text;
var queryname =
new
List();
using
(StreamReader reader =
new
StreamReader(
"C:\\Documents\\TestFile.txt"
))
{
while
(
true
)
{
string
line = reader.ReadLine();
if
(line ==
null
)
{
break
;
}
queryname.Add(
new
QueryName(line));
}
}
//var grid = sender as DataGrid;
dg.ItemsSource = queryname;
}
Reply
Answers (
2
)
Write a problem to throw an exception
Error in updating products on datagridview c#