------解决方案--------------------
foreach (GridViewRow gvr in GridView1.Rows) { System.Data.DataTable dt = new System.Data.DataTable(); System.Data.DataRow dr; dt.Columns.Add(new System.Data.DataColumn("id", typeof(System.String))); CheckBox ch = (CheckBox)gvr.FindControl("ChkItem"); if (ch.Checked) { dr = dt.NewRow(); dr[0] = GridView1.DataKeys[gvr.DataItemIndex].Value.ToString(); dt.Rows.Add(dr); } }
------解决方案--------------------
------解决方案--------------------
public class SmsManagerActivity extends TabActivity { /** Called when the activity is first created. */ private TabHost tabHost; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); tabHost = getTabHost();//得到TabHost // setUpConversation(); setUpDuixiang(); setUpDiaoqian(); }
------解决方案--------------------
------解决方案-------------------- System.Data.DataTable dt = new System.Data.DataTable(); System.Data.DataRow dr; foreach (GridViewRow gvr in GridView1.Rows) {