0

i hava retrieve the data from database to text box but i am getting only one row from the table i want to retrieve all the rows of a table in the text boxes how it is possible please help me sir.

4
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by taylby
0

without seeing your code its very hard to see what you might need to change.
Please post any code relevant to your question in [code]

[/code] tags.

2

@anitha10
As a sidenote, I see you have several threads named C#.
Please give your threads a more appropriate name.
It will help us all.:)

0

As some one else has mentioned include your code. However what I guess you could do is the following:

foreach (datarow dr in dt.rows)
{
txtTextbox.text = txtTextBox.text + "\n" dr[0].tostring() ; 
}

what this does is loop through your rows and adds them to the text box adding a new line as they go denoted by the "\n". Note however that this will only work if you have multiline set to true.

Try this I can't quite remember all the ins and outs and you will have to correct the capital letters etc...

--Taylby

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.