Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.
Public Function get_Search(ByVal RegNumber As Integer, ByVal chkBoxes As Integer, ByVal indexNumber As Integer, ByVal SearchString As String) Dim sender As System.Object = Me Dim e As System.EventArgs '... the code handles the arguments and sets up the search as if it were the user selecting in the search form.... ' The search is the executed.. btnFind_Click(sender, e) ' In the btnFind_Click procedure, the results are stored in datagridSok. I want to return the ' datagrid or the columns and assign them to another already existing datagrid in another form: Return datagridSok.Columns End Function 'What I have come up with so far is this(done in another form): Private Sub btnTestSok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTestSok.Click dgCustomer.Columns.Clear() Dim tempDataGridViewColumnCollection As System.Windows.Forms.DataGridViewColumnCollection tempDataGridViewColumnCollection = frmSok.get_Search(1, 1, 1, "String") 'The following does not work, I have tried numerous variants... dgCustomer.Columns.Add(tempDataGridViewColumnCollection.Item(1)) End Sub
|Needing an event fired when a row is added on a datagridview||4||45|
|Capture logon name||13||70|
|Why does my excel data start at B1 instead of A1.||9||80|
|VB.NET (2008) - Refactoring Question||2||19|