方法1; foreach(GridViewCell gc in gridView1.Cells)
{
SmobilerUserControl1 uc = (SmobilerUserControl1)gc.Control;
DataRowView drv =(DataRowView) uc.TemplateData;
Toast(drv.Row.ItemArray[0].ToString());
}
方法2:
foreach(GridViewCell gc in gridView1.Cells)
{
SmobilerUserControl1 uc = (SmobilerUserControl1)gc.Control;
Label label = (Label)(uc.Controls.Find("label1", true));
Toast(label.Text);
} |