Datagrid problems

  • Thread starter Thread starter Jens Strom
  • Start date Start date
J

Jens Strom

why i have no datas in my datagrid but i have 16 rows but no columns.
16 rows that is the correct rows for all my datas but i dont see thes datas
in my datagrid.

someone a idea?

Thanks Jens

// Set up the DataAdapter and fill the DataSet

da.SelectCommand = cmdSelect;
da.UpdateCommand = cmdUpdate;
da.DeleteCommand = cmdDelete;

dataGridTableStylePeriode.GridColumnStyles.Add(dataGridTextBoxColumnID);
dataGridTableStylePeriode.GridColumnStyles.Add(dataGridTextBoxColumnName);
// etc...

dataGridClient.TableStyles.Add(dataGridTableStyleClient);
da.Fill(ds, "tblClient");

dataGridClient.SetDataBinding(ds, "tblClient");
 
Jens,
Perhaps you could try this:
// Set up the DataAdapter and fill the DataSet

da.SelectCommand = cmdSelect;
da.UpdateCommand = cmdUpdate;
da.DeleteCommand = cmdDelete;

DataGridTextBoxColumn dataGridTextBoxColumnID= new DataGridTextBoxColumn();

dataGridTextBoxColumnID.MappingName = "ID"; //ID is supposed to be the
field name from "tblClient" table

dataGridTextBoxColumnID.HeaderText = "ID"; //This is the header text

dataGridTextBoxColumnID.Width = 80;
dataGridTableStylePeriode.GridColumnStyles.Add(dataGridTextBoxColumnID);

Do the same as the above for field "Name"...
 
Jens,
Perhaps you could try this:
// Set up the DataAdapter and fill the DataSet

da.SelectCommand = cmdSelect;
da.UpdateCommand = cmdUpdate;
da.DeleteCommand = cmdDelete;

DataGridTextBoxColumn dataGridTextBoxColumnID= new DataGridTextBoxColumn();

dataGridTextBoxColumnID.MappingName = "ID"; //ID is supposed to be the
field name from "tblClient" table

dataGridTextBoxColumnID.HeaderText = "ID"; //This is the header text

dataGridTextBoxColumnID.Width = 80;
dataGridTableStylePeriode.GridColumnStyles.Add(dataGridTextBoxColumnID);

Do the same as the above for field "Name"...
dataGridTableStylePeriode.GridColumnStyles.Add(dataGridTextBoxColumnName);
// etc...

dataGridClient.TableStyles.Add(dataGridTableStyleClient);
da.Fill(ds, "tblClient");

dataGridClient.SetDataBinding(ds, "tblClient");

Hopefully would be helpful,
pcPirate
 
Back
Top