Adding rows to the table


S

simon

I have button on page and I would like to dynamically add new row to the
table every time, the user clicks the button.

Private Sub btnOkST_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnOkST.Click
Dim vrstica As New HtmlTableRow
Dim stolpec As New HtmlTableCell

stolpec.InnerText = "TEST"
vrstica.Cells.Add(stolpec)
tblCene.Rows.Add(vrstica)

End Sub

This adds the row to the table only the first time, when user click the
button.

If the user click more times nothing happens.
Why?

Then I would like to add the button into the added row, and when user clicks
that button, I would like that row dissapeared.

Any example?

Thank you,
Simon
 
Ad

Advertisements


Top