Problems using DataGrid with T4A
Posted: Mon Apr 21, 2014 12:42 pm
Hello to all.
I'm experiencing some problems using datagrid object (Target: T4A; iX version: 2.0).
When in simulation mode, the Datagrid shows filled as in the picture (OK)
When running in the target, with exactly the same (just for example) code, the Datagrid apears empty as bellow (screenshot)
Code used:
void btExport_Click(System.Object sender, System.EventArgs e)
{
/*scptDatabaseTools dbTools=new scptDatabaseTools();
DataSet dsOrig=dbTools.GetResultSet("ResultadosTesteLogger");*/
DataSet ds=new DataSet();
//MessageBox.Show(""+dbTools.GetCSVHeader(ds.Tables[0].Columns));
//MessageBox.Show(""+dbTools.GetCSVRow(ds.Tables[0].Rows[0]));
//Just for debug
DataTable dataTbl = new DataTable("Teste");
dataTbl.Columns.Add("Hello1", System.Type.GetType("System.String"));
dataTbl.Columns.Add("Hello2", System.Type.GetType("System.String"));
ds.Tables.Add(dataTbl);
DataGrid1.DataSource=ds.DefaultViewManager;
//Just for debug
}
Can you please tell me what am I doing wrong?
Thanks in advance.
I'm experiencing some problems using datagrid object (Target: T4A; iX version: 2.0).
When in simulation mode, the Datagrid shows filled as in the picture (OK)
When running in the target, with exactly the same (just for example) code, the Datagrid apears empty as bellow (screenshot)
Code used:
void btExport_Click(System.Object sender, System.EventArgs e)
{
/*scptDatabaseTools dbTools=new scptDatabaseTools();
DataSet dsOrig=dbTools.GetResultSet("ResultadosTesteLogger");*/
DataSet ds=new DataSet();
//MessageBox.Show(""+dbTools.GetCSVHeader(ds.Tables[0].Columns));
//MessageBox.Show(""+dbTools.GetCSVRow(ds.Tables[0].Rows[0]));
//Just for debug
DataTable dataTbl = new DataTable("Teste");
dataTbl.Columns.Add("Hello1", System.Type.GetType("System.String"));
dataTbl.Columns.Add("Hello2", System.Type.GetType("System.String"));
ds.Tables.Add(dataTbl);
DataGrid1.DataSource=ds.DefaultViewManager;
//Just for debug
}
Can you please tell me what am I doing wrong?
Thanks in advance.