Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 08, 2012 07:33 AM by Nasser Malik
Member
65 Points
74 Posts
May 08, 2012 07:21 AM|LINK
hi,
I have a gridview where it has a column bound field and it contains image control created by using dataformat string
BoundField Column1= new BoundField(); Column1.DataField = "INDOCNO"; Column1.HeaderText = "Action"; Column1.DataFormatString="<img id='imgView' style='CURSOR: hand' alt='View' src='Images/DocView.gif' onclick=\"javascript: selectrow(this);\">";
in
<script language="JavaScript">
selectrow(img)
{
//how to get the row which is the parent of the image ? so that i will change the row.style attribute.
}
</script>
Star
11208 Points
1720 Posts
May 08, 2012 07:33 AM|LINK
see this working example
http://www.c-sharpcorner.com/UploadFile/sapnabeniwal/radio-button-selection-and-change-selected-row-style-of-grid/
and few helping discussion
http://stackoverflow.com/questions/4543101/jquery-onclick-change-background-color-for-table-cells
http://stackoverflow.com/questions/688222/add-background-color-and-border-to-table-row-on-hover-using-jquery
ann06
Member
65 Points
74 Posts
how to highlight row in grid view upon select an image control in a cell of the row?
May 08, 2012 07:21 AM|LINK
hi,
I have a gridview where it has a column bound field and it contains image control created by using dataformat string
in
<script language="JavaScript">
selectrow(img)
{
//how to get the row which is the parent of the image ? so that i will change the row.style attribute.
}
</script>
Nasser Malik
Star
11208 Points
1720 Posts
Re: how to highlight row in grid view upon select an image control in a cell of the row?
May 08, 2012 07:33 AM|LINK
see this working example
http://www.c-sharpcorner.com/UploadFile/sapnabeniwal/radio-button-selection-and-change-selected-row-style-of-grid/
and few helping discussion
http://stackoverflow.com/questions/4543101/jquery-onclick-change-background-color-for-table-cells
http://stackoverflow.com/questions/688222/add-background-color-and-border-to-table-row-on-hover-using-jquery
Skype: maleknasser1