Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. button inside a gridview to display more detailed grid view

button inside a gridview to display more detailed grid view

Scheduled Pinned Locked Moved Web Development
csshelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Oga M
    wrote on last edited by
    #1

    This is the code for the first gridview,when the page open it should display the names of all the project members, Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Page.IsPostBack = False Then 'txtProjectManager.Text = Session("ProjectManager") Dim obj As Businesslayer.TimeSheet = New Businesslayer.TimeSheet Dim ds As New Data.DataSet ds = obj.GetProjectMembers1 GridView2.DataSource = ds GridView2.DataBind() End If End Sub This is the code foe the btn when I click the button inside the gridview it must show,the second gridview for each row Private Sub Button1_Click(ByVal o As Object, ByVal e As EventArgs) Dim Button1 As Button = DirectCast(o, Button) Dim grdRow As GridViewRow = DirectCast(Button1.Parent.Parent, GridViewRow) Dim strField1 As String = grdRow.Cells(0).Text Dim strField2 As String = grdRow.Cells(0).Text End Sub This is the code for the second grid view Protected Sub GridView2_SelectedIndexChanging(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView2.SelectedIndexChanged Dim gv As GridView = CType(sender, GridView) Dim ds As New Data.DataSet Dim obj As Businesslayer.TimeSheet = New Businesslayer.TimeSheet ds = obj.GetTimeSheet(gv.SelectedValue.ToString()) obj = Nothing GridView1.DataSource = ds GridView1.DataBind() End Sub When I click the btn,it only postback,doesn’t display the second gridview,what might be the problem?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups