I don't know why they closed forums.asp.net after so many years. Anyways, hopefully I hope to see other posters from that site over here!
I have a page with about 10 gridviews on it. Each one has a modal popup extender. On one of them I have added a column at the far left with a checkbox. in the gridview. I have javascript code that you can only select one of the checkboxes in the gridview. I'm using postback =true for the checkbox and the oncheckbox changed event handler to popuplate the grideview directly below the gridvew. When you check one of the boxes in gridview 5, it populates the gridview 6 directly below it with income information which is tied to the employer ID in the gridview 5.
There are a couple of of issues. On initial page load, the gridview 5 loads with employer data. As long as there is one row, the checkbox should be checked on the left. How is this done? In the page load event? In Rowdatabound event? When this happens, the gridview below (gridveiew 6) should load with the income that is tied to the employer in the above gridview. There can be several types of income an employer in the above gridview. I'm using the empid datakey from gridview 5 to store into a column in the income database.
Is there a way to update the gridview 6 without causing a postback? So when you check a box in gridview 5, there is no page refresh.
Protected Sub ChckedChanged(ByVal sender As Object, ByVal e As EventArgs)
Dim row As GridViewRow = TryCast((CType(sender, Control)).Parent.NamingContainer, GridViewRow)
Dim key As String = GridView5.DataKeys(row.RowIndex).Value.ToString()
Dim Incomeadapter As New DataSet1TableAdapters.IncomeTableAdapter
Dim tblincome As New DataSet1.IncomeDataTable
tblincome = Incomeadapter.GetData(key)
GridView6.DataSource = tblincome
GridView6.DataBind()
End Sub