Home>
/* lvstudentlist is the name of the listview control * /
dataset ds=new dataset ();
ds=student.querystudents ();//Query table information
int rowcount, columncount, i, j;
rowcount=ds.tables [0] .rows.count;
columncount=ds.tables [0] .columns.count;
lvstudentlist.beginupdate ();
lvstudentlist.items.clear ();
string [] lvitem=new string [columncount];
for (i=0;i<rowcount;i ++)
{
  for (j=0;j<columncount;j ++)
  {
   lvitem [j]=ds.tables [0] .rows [i] [j] .tostring ();
  }
  listviewitem lvi=new listviewitem (lvitem);
  lvstudentlist.items.add (lvi);
}
lvstudentlist.endupdate ();
c
  • Previous Example analysis of the use of Java's image buffering technology
  • Next Learn more about the use of UIWindow in iOS development