Tag: gridview

Select a gridview row by clicking

SELECT ROW IN A GRID VIEW BY CLICKING

Protected Sub GridView_Labels_RowCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView_Labels.RowCreated

If e.Row.RowType = DataControlRowType.DataRow Then

e.Row.Attributes.Add(“onclick”, Page.ClientScript.GetPostBackEventReference(sender, “Select$” & e.Row.RowIndex.ToString))

e.Row.Style(“cursor”) = “hand”

End If

End Sub


Formatting Gridview Header

|    A    |    B C    |    D E / F   |

|    A    |    B      |    D         |
|         |    C      |    E / F     |

You can do it without templates. Just set HtmlEncode=”False” on the headers with <br /> tags in them.

Example:


  • Cloud World

  • Custom Search



  • Cyberbrutus
    iDream theme by Templates Next | Powered by WordPress

    Switch to our mobile site