Display text and background color based on Gridview cell value
ASP.NET
1
Posts
1
Posters
3
Views
1
Watching
-
The following code displays master/detail form and when the master is expanded, displays details associated with the master record. It works as expected. Here is that code:
'HTML
function expanCollapse(input) {
var displayIcon = "img" + input;
if ($("#" + displayIcon).attr("src") == "images/plus.png")
{
$("#" + displayIcon).closest("tr")
.after("<tr><td></td><td colspan = '100%'>" + $("#" + input)
.html() + "</td></tr>");
$("#" + displayIcon).attr("src", "images/minus.png");
} else
{
$("#" + displayIcon).closest("tr").next().remove();
$("#" + displayIcon).attr("src", "images/plus.png");
}
}[');"> " src="images/plus.png" />](JavaScript:expanCollapse\('div<%# Eval\()
" style="display: none;">
'VB
Protected Sub Page\_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load If Not Me.IsPostBack Then End If Dim sql As String = "SELECT e.EmployeeID, e.empID, e.employeeName,e.empTitle, e.email "