Click here to Skip to main content
15,899,474 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have an image button in a gridview.

And I have added HOverMenuExtender to that button to display a panel.

Now I want to get the row number on mouse over.

Please help
Posted
Updated 10-May-17 5:15am
v2
Comments
JoCodes 22-Oct-13 4:41am    
Can you post your code what you have tried so far and where are you facing problem?

1 solution

on grid view row data bound you can add attribute

C#
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
    // Excludes row header and pager rows  
        
        e.Row.Attributes.Add("onmouseover", "ShowRowNumber(" + e.Row.RowIndex + ")");
    }
}


java script function should be

JavaScript
function ShowRowNumber(number)
{
alert(number);
}


i hope it will work.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900