Hi,
I have a CSV file with two columns in it.
Below is some data from the file:
0000,AllAllowed
0002,SomeAllowed
000A,AlphaAllowed
...., ....
This CSV is read into a table like this:
Code:
OleDbConnection cn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source= C:\;Extended Properties=""Text;HDR=No;FMT=Delimited""");
OleDbCommand cmd = new OleDbCommand(sqlSelect, cn);
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
dt = new DataTable("TestTable");
dt.Locale = CultureInfo.InvariantCulture;
da.Fill(dt);
This data table is then bound to a datagirdview like this:
Code:
BindingSource bsdatabind = new BindingSource();
bsdatabind.DataSource = this.dtperson;
this.dataCenterGridView.DataSource = bsdatabind;
When the data is displayed in the DataGridView it shows only '0' for '0000', '2' for '0002' and completely ignores '000A'.
what do I need to make it display the data as it is in the CSV.
Thanks and Regards.