Hi Guys,

I am almost done with my program, until this problem arises and I can't solve.

I have two forms.

First form has 1 listbox and 2 buttons.
Second form has 1 datagridview and 1 button.

The first form opens the csv and list the location+filename of the CSV file. When the CSV files are listed in the listbox, the user can edit the selected csv file in listbox through edit button, when edit button is pressed, the second form will show as dialog and automatically opens the CSV files in DataGridView. The user will edit some fields and save and the second form will autoclose. Now here's the problem, when i select another CSV file in the listbox and press the edit button, the previous CSV still shows, even other CSV files I select, still the previous CSV file was showing.

What seems to be my problem? I tried disposing and refreshing the DGV but it will not work. Hope someone will help me. Thanks in advance.

Without seeing your code is difficult to say what is the origin of the problem.

Instead of disposing the DGV, try disposing the Second form and creating a new one before showing in dialog mode.

Hope this helps.

thanks for the reply lolafuertes, since I'm not on my desk, i can't post it but I will as soon as possible. I'll try your suggestion.

This question has already been answered. Start a new discussion instead.