Theres more

We can modify the preceding jQuery script slightly to apply the same effect on a GridView cell by using the jQuery selector $("#<%=GridView1.ClientID%> td").

Thus, update the script as follows to remove a GridView cell:

$("#<%=GridView1.ClientID%> td").click(function() { $(this).addClass("highlight"); $(this).fadeOut(1000, function() { $(this).remove();

[rlTX Note that in the preceding script, there is no need to explicitly filter I ^vs^ the header since the header cells are rendered as <th> element. I

Thus, on clicking any cell, it fades slowly and disappears as shown in the following screenshot:

'") Chapter 3 - Recipe 2: Removing GridView rows j cells on click - Mozilla Firefox

^jnjxj

File Edit View History Bookmarks Tools Help

0 0

Post a comment