Click here to Skip to main content
15,888,590 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm using wpf c# and entityframwork i want to move between record and show these in the textbox from my database ,with a button

my mean's when i click the button that go to the next record(row) but not in datagrid , in textbox enter image description here

Here is Mo Code Behind :
C#
var qreliststuf = dbms.Database.SqlQuery<MyTable>("Select * From MyTable");

foreach (var tbl in qreliststuf)
{
    texb_codekala.Text = tbl.CODE.ToString();
    texb_namekala.Text = tbl.NAM.ToString();
    texb_barcode.Text = tbl.N_FANI.ToString();
}

Please Help

What I have tried:

Looked at: database - How move between record and show them in textbox from databse with a button in wpf c# - Stack Overflow[^]
Posted
Updated 10-Oct-20 4:24am
v2
Comments
Richard MacCutchan 10-Oct-20 7:21am    
Although that may work, the user will only ever see the last record. Using a TextBox to display a list of items is not really a good idea. Use a DataGridView so the user can scroll through the records and pause at any they are interested in.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900