Vish Dav

Vish Dav

  • NA
  • 16
  • 15k

DatagridView does not Show Data on Databound to DataTable

Jun 8 2011 10:59 AM
Hi,

I have a DataGridView that has 3 columns predefined,one of them is a Drop down.
Now I populate a Datatable and bind it to this DataGridView.
However,I do not see any Data Displayed on the DataGridView.On Debugging,I found that the DataTable reads 3 rows,these 3 rows are added to the DataGridView(which can be seen),but there is no Data Visible..Any Clues??

            conn_obj.Connect();
            SQL = "SELECT FIELDNAME BS_FIELDF WHERE FK_TABDF = '";
            SQL = SQL + Table_pkey + "' ORDER BY FIELDNAME";
            dSet = conn_obj.SQL_Data_Retrieve(SQL.ToString(), "BS_FIELDF");
            conn_obj.DisConnect();
            Bind_DataGridView.DataSource = dSet.Tables[0];
            MainTableGrid.DataSource = Bind_DataGridView.DataSource;
            MainTableGrid.Refresh();
            MainTableGrid.Parent.Refresh(); 

I get to see the 3 rows,but I don't see any information displayed....Any Advice would be much appreciated.. 

Answers (9)