| |

VerySource

 Forgot password?
 Register
Search
View: 1025|Reply: 9

About loop output datatable

[Copy link]

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-26 11:00:01
| Show all posts |Read mode
I want to output the classification of the datatable in a loop, and output the corresponding datatable article list according to the classification, that is, the left cell is the classification, and the right cell is the article list (take the first five). Tried many times, but the page structure is not neat, I don't know how to achieve output and maintain the format? Hope you master
Reply

Use magic Report

1

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-2-18 01:45:01
| Show all posts
Try using table
Then insert the information into the table yourself
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-3-15 11:30:02
| Show all posts
I just use TABLE, but the datatable data rows [i] and i in TABLE are all manually assigned. I would like to ask you if there is a way to associate the two datatables and output them automatically. For example, if I want to cycle the row output classification, Nest the TABLE loop in the second column of the row where the loop comes out to output the article title of this class.
Reply

Use magic Report

0

Threads

31

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

Post time: 2020-3-17 17:45:01
| Show all posts
Relate yourself, not all code is written by someone, then the programmer profession does not exist
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-6-14 15:30:01
| Show all posts
Halo, I learned this for two months, and I don’t understand a lot, so I asked everyone, please don’t hit me, let’s help the newcomer
Reply

Use magic Report

0

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-6-17 20:45:01
| Show all posts
You can try it with datatable.select(...).
for(int i = 0;i< datatable1.rows.count;i++)
{
  ...
  datarows []rs = datatable2.select("xxx = "+ datatable1.row[i]["??"].tostring());
  ...
}
Do not know whether you can meet your requirements by using a similar method.
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-7-29 14:15:01
| Show all posts
Sorry, upstairs, mine uses two conditions to filter out categories and articles respectively. How can I relate that?
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-7-29 14:45:01
| Show all posts
Associate with Sql statement
Reply

Use magic Report

0

Threads

13

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-7-29 17:45:01
| Show all posts
It can be achieved with the right join statement. If such a table set structure can be obtained on the data source, try to process it on the data source.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-29 19:15:01
| Show all posts
First take out 2 tables, CreateRelation
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list