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).
protected void btnShowProject_Click(object sender, EventArgs e) { Project project = new Project(); DataTable result = project.getAll( ); Table table = new Table(); TableRow tableRow = new TableRow(); TableCell tableCell = new TableCell(); tableCell.Text = "id"; tableRow.Cells.Add(tableCell); tableCell = new TableCell(); tableCell.Text = "name"; tableRow.Cells.Add(tableCell); table.Rows.Add(tableRow); tableRow = new TableRow(); for (int i = 0; i < result.Rows.Count; i++) { for (int j = 0; j < result.Columns.Count; j++) { tableCell = new TableCell(); tableCell.Text = result.Rows[i][j].ToString(); tableRow.Cells.Add(tableCell); } table.Rows.Add(tableRow); tableRow = new TableRow(); } contentProject.Controls.Add( table); }
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.