hi,

I want to draw the line in starting point of the column where the mousepointer is. Example
I have 5 columns in the datagridview and the mouse pointer is at 3 column means that column must indicate with a line at the begning of the columnindex 3.

ASPX.CS
private void GridView_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if ((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem))
{
e.Item.Attributes.Add("onMouseOver", "SetNewColor(this);");
e.Item.Attributes.Add("onMouseOut", "SetOldColor(this);");
}
}

ASPX
<script language="javascript">
function SetNewColor(source)
{
_oldColor = source.style.backgroundColor;
source.style.backgroundColor = '#FFCCCC';//#FFCCCC';
source.style.cursor='hand';
}

function SetOldColor(source)
{
source.style.backgroundColor = _oldColor;
}
</script>

Hope this will help you atleast.

Regards
Dabuskol

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.