Below is source code: but not certain why I am getting a Key not found - tried Binding at Runtime to datasource without any schema defined. Also defined schema and no use.
UltraDataSource src = new UltraDataSource();
src.Band.Columns.Add(
"Phase");
"Unit Code");
"Unit Description");
"Maintainable Items", Type.GetType("System.Nullable`1[System.Int32]"));
"Technology Type Assigned", Type.GetType("System.Nullable`1[System.Int32]"));
"Size Assigned", Type.GetType("System.Nullable`1[System.Int32]"));
"Service Assigned", Type.GetType("System.Nullable`1[System.Int32]"));
"FMECA Assigned", Type.GetType("System.Nullable`1[System.Int32]"));
while(reader.Read())
{
string sPhase = reader[0].ToString();
string sUnitCode = reader[1].ToString();
string sUnitDesc = reader[2].ToString();
int iTotal = reader.GetInt32(3);
int iTTTotal = reader.GetInt32(4);
int iSizeTotal = reader.GetInt32(5);
int iServiceTotal = reader.GetInt32(6);
int iFMECATotal = reader.GetInt32(7);
object[] values = { sPhase, sUnitCode, sUnitDesc, iTotal, iTTTotal, iSizeTotal, iServiceTotal, iFMECATotal };
src.Band.DataSource.Rows.Add(values);
}
reader.Close();
breakdownGrid.DataSource = src;
Hello haessd,
I tried this and it always works fine for me so I attached my sample to this post for you. Please review it and feel free to let me know if I misunderstood you or if you have any other questions.