I have WindowsForm solution with a datagridview to display the data that I read from text file. The number of rows from data is large, about 10.000 lines.
When I run the program from visual studio, it seems fine. But when I run it from the Debug folder (.exe file), then something goes wrong with my datagridview. The scroll-bar is missing.
Here is how I fill the datagridview:
private void LoadInputData()
{
try
{
InputDataGridView.DataSource = null;
InputDataGridView.Refresh();
InputDataGridView.DataSource = inputDataTable;
DisableCells();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Load Input Data Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
I have a function that is designed to fill the inputDataTable from a text file. The DisableCells() function is to lock the datagridview (i.e. set the readonly properties be true) and customize the column length.
The data still can be scrolled by mouse. How does it happen? How do I solve this?
Here is preview of my program: link