I have a table with 100 or more rows that are created at runtime in asp.net by Table
.
This table shows projects of a user.
Different user have some different projects.
I want when admin clicks on row of name user show rows content list of user project (slideToggle).
JavaScript
x
36
36
1
protected void btnShowProject_Click(object sender, EventArgs e)
2
{
3
Project project = new Project();
4
DataTable result = project.getAll( );
5
6
Table table = new Table();
7
TableRow tableRow = new TableRow();
8
TableCell tableCell = new TableCell();
9
10
tableCell.Text = "id";
11
tableRow.Cells.Add(tableCell);
12
13
tableCell = new TableCell();
14
tableCell.Text = "name";
15
tableRow.Cells.Add(tableCell);
16
17
table.Rows.Add(tableRow);
18
tableRow = new TableRow();
19
20
for (int i = 0; i < result.Rows.Count; i++)
21
{
22
for (int j = 0; j < result.Columns.Count; j++)
23
{
24
25
tableCell = new TableCell();
26
tableCell.Text = result.Rows[i][j].ToString();
27
tableRow.Cells.Add(tableCell);
28
}
29
table.Rows.Add(tableRow);
30
tableRow = new TableRow();
31
}
32
33
contentProject.Controls.Add( table);
34
35
}
36
Advertisement
Answer
Take look to this: http://jqueryui.com/demos/accordion/
I think this is what you want, try something from the examples. If you would have problems post back.