I am creating a table with data, and there should be a recycle-bin icon for each row in the previous column, The problem I'm allowed to delete that row is, I do not have this icon or how to add it.
This is a and
is web control and I'm adding rows and cells to the C # file behind it.
I'm thinking of using something like this:
table cell cell = new tableclose (); Cell.
And that's where I got stuck I should have a cell in that clickable recycle-bin icon, but I do not know how to add it.
Until I'm missing something, can not you just add one image to the cell?
Or you can set the tableale's HTML directly through the text property:
string recycleBlue image = "
OR
image recycle bin image = new image (); RecycleBinImage.ImageUrl = "/Images/recycle_bin.jpg"; Cell.Controls.Add (recyleBinImage); Row.Controls.Add (cell);
Then if you want to "delete" something, just add the "onclick" attribute:
recycleBinImage.Attributes.Add ("onclick", "SomeFunctionWhichDeletes ();");
Comments
Post a Comment