Hi,
Using Windows forms, I click a button on one page. This button pops up another page with a datagridview, where the data of a selected row from the first datagridview is edited.
So, the first page has a datagridview and its selected row becomes what fills the datagridview of the popup page (the child datagridview gets its WHERE filter value from the parent's selectedcells(0)). Below is the code that does this but to me it seems like a hack. is there another way to accomplish this, using as little handwritten code as possible?
Thanks!
Pettrer
Using Windows forms, I click a button on one page. This button pops up another page with a datagridview, where the data of a selected row from the first datagridview is edited.
So, the first page has a datagridview and its selected row becomes what fills the datagridview of the popup page (the child datagridview gets its WHERE filter value from the parent's selectedcells(0)). Below is the code that does this but to me it seems like a hack. is there another way to accomplish this, using as little handwritten code as possible?
VB.NET:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TermEgenskaper.Show()
TermEgenskaper.TermBindingSource.Filter = "cTermKod = '" & TermDataGridView.SelectedCells(0).Value & "'"
End Sub
Thanks!
Pettrer