// Bind the control to the data set fpSpread1.DataSource = dbDataSet; ' Bind the control to the data set FpSpread1.DataSource = dbDataSet
// Add an unbound row fpSpread1.Sheets[0].AddUnboundRows(3, 1); ' Add an unbound row FpSpread1.Sheets(0).AddUnboundRows(3, 1)
// Set custom text in the first column header fpSpread1.Sheets[0].ColumnHeader.Cells[0, 0].Text = "Name"; ' Set custom text in the first column header FpSpread1.Sheets(0).ColumnHeader.Cells(0, 0).Text = "Name"
// Turn off automatic cell type assignment fpSpread1.Sheets[0].DataAutoCellTypes = false; ' Turn off automatic cell type assignment FpSpread1.Sheets(0).DataAutoCellTypes = False
// Turn off automatic column and field mapping fpSpread1.Sheets[0].AutoGenerateColumns = false; // Set the fields for the columns fpSpread1.Sheets[0].Columns[0].DataField = "Company"; fpSpread1.Sheets[0].Columns[1].DataField = "Country"; ' Turn off automatic column and field mapping fpSpread1.Sheets(0).AutoGenerateColumns = false ' Set the fields for the columns fpSpread1.Sheets(0).Columns(0).DataField = "Company" fpSpread1.Sheets(0).Columns(1).DataField = "Country"
' Add a relationship to the dataset ds.Relations.Add("Root", ds.Tables("Categories").Columns("CategoryID"), ds.Tables("Products").Columns("CategoryID")) ' Bind Spread FpSpread1.DataSource = ds