Hi.. I'm having problem with open file dialog

When I first open the program then select(browse) the files, if I press the cancel button, the entry files are not selected(not go to the data grid), but after the first try, if I cancel, the entry from the first try got inserted, Is this bug? I've used filedialog.dispose()..
I've tried to put the dispose after showdialog() but it still doesn't work..

here's the code

Code:
        FileDialog.ShowDialog()

        total = FileDialog.FileNames.Length
        uplot = New String(total) {}
        If total > 0 Then
            dgv_uplot.Rows.Add(total)
        End If

        FileDialog.Dispose()

        For i = 0 To total - 1
            uplot(i) = Me.filedialog.FileNames(i).ToString

            dgv_uplot.Item(1, baris).Value = uplot(i)
            baris += 1
        Next

        FileDialog.Dispose()