Reputation: 410
Screenshot:
I have created a DataGridView in windows forms application. i have bound data with DataTable. I get data but it is not displaying. When i select the row then it is visible.
grdPiDetails.DataSource = iDBUtility.GetDataTable("exp_imp_get_all_PI");
Upvotes: 0
Views: 67
Reputation: 3257
This is happening probably because the DataGridViewCell
has Foreground
color set as White
Include this in your Form_Load
event: [change myDGV with your DataGridView
]
myDGV.RowsDefaultCellStyle.ForeColor = Color.Black;
If this won't fix your issue, try @Niraj's solution
Upvotes: 1
Reputation: 34
Try This :
First click on DataGridView -> Edit Column -> (Left Side) Select Column (Like First_Name) -> (Right Side) Set DataPropertyName (Like firstname).
Records Will Display.
Upvotes: 1