1.gridview Դ?源码?
2.Android开发gridview功能
gridview Դ??
string a = this.GridView2.DataKeys[e.RowIndex][0].ToString();
string str = ((TextBox)this.GridView2.Rows[e.RowIndex].Cells[0].Controls[0]).Text;
string ds = ((TextBox)this.GridView2.Rows[e.RowIndex].Cells[1].Controls[0]).Text;
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=Test;Integrated Security=True");
con.Open();
SqlCommand cmd=new SqlCommand("update T1 set T_title='"+str+"' ,T_date='"+ds+"' where T_id='"+a+"'",con);
if (Convert.ToInt(cmd.ExecuteNonQuery()) > 0)
{
Response.Write("更新成功");
}
else
Response.Write("更新失败");
bind();
}
Android开发gridview功能
parent.getAdapter().getItem(position)
parent.getItemAtPosition(position)
这两个方法都行,返回Object类型,源码房产中介源码大全你可以进行一下转型
注:如果你看源码的源码源码用下载吗话会发现其实都是用adapter.getItem(position) 获得的