John Cassell
Well-known member
- Joined
- Mar 20, 2007
- Messages
- 65
- Programming Experience
- Beginner
Hi,
Can someone tell me how to achieve the following pls...
I have a form which displays search results based on what the user is doing. Example he may enter 'UNITED' and press F2 which will load the form and display the 'Customers' datagridview. Alternatively he may enter 'A0123' and press F2 which will load the form and display the 'Jobs' datagrid view.
I have a couple of problems with how this is working:
1. If I need the form to load with the Jobs Datagridview, instead of simply writing searchform.show followed by SearchForm.TBL_JobsDataGridView.Show I, for some reason have to put it like this..
Shouldn't I be able to display the Jobs datagrid instead of what seems like the opposite way around, i.e DON'T show the customer datagrid?
and
2. I need to be able to get the value of the cell in the first column of the row they are on and I have been able to get this by this code:
What I need though is instead of saying 'show me the value of the cell in the CustomersDataGridView', I would like it to say 'Show me the value of the cell in the currently displayed Datagridview. Is this possible?
Thanks
John
Can someone tell me how to achieve the following pls...
I have a form which displays search results based on what the user is doing. Example he may enter 'UNITED' and press F2 which will load the form and display the 'Customers' datagridview. Alternatively he may enter 'A0123' and press F2 which will load the form and display the 'Jobs' datagrid view.
I have a couple of problems with how this is working:
1. If I need the form to load with the Jobs Datagridview, instead of simply writing searchform.show followed by SearchForm.TBL_JobsDataGridView.Show I, for some reason have to put it like this..
VB.NET:
SearchForm.Show()
SearchForm.TBL_CustomersDataGridView.SendToBack()
Shouldn't I be able to display the Jobs datagrid instead of what seems like the opposite way around, i.e DON'T show the customer datagrid?
and
2. I need to be able to get the value of the cell in the first column of the row they are on and I have been able to get this by this code:
VB.NET:
TBL_CustomersDataGridView.CurrentRow.Cells(0).Value
What I need though is instead of saying 'show me the value of the cell in the CustomersDataGridView', I would like it to say 'Show me the value of the cell in the currently displayed Datagridview. Is this possible?
Thanks
John