18 Aug 2011

Gridview row clickable and selectable

e.Row.Attributes.Add("onmouseover", "this.style.textDecoration='underline';this.style.cursor='pointer';this.previous_color=this.style.backgroundColor;this.style.backgroundColor='#D1DDF1';")
            e.Row.Attributes.Add("onmouseout", "this.style.textDecoration='none';this.style.cursor='auto';this.style.backgroundColor=this.previous_color;")
            e.Row.Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(sender, "Select$" & e.Row.RowIndex.ToString))

No comments:

Post a Comment