loop through datagrid

S

susie

I have set up datagrid present data in textbox sytle on
page load. How do I to loop through textbox presented in
the datagrid?

For example: the following data presented in datagrid
style:
textboxrow1coloumn1 textboxrow1coloumn2
textboxrow2coloumn1 textboxrow2coloumn2
....

It is not known how many rows will be looped through at
two columns per row.
 
M

Micharel Tkachev

You can create the foreach cycle.

Protected DataGrid dgdTest;
....
your code
....
foreach(DataGridItem dg in dgdTest.Items)
{
// your code...
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top