50分求解,各位路过的解一下。
解决方案 »
- c#
- C# 程序部署
- 窗体的继承小问题
- 问一个问题,怎么用js 调用MSCOMM控件发送字节
- winform给一个按钮设置了anchor(Top, Bottom, Left, Right)发现按钮的右边和下边同Form的边上的距离为0,如何设置这个值?
- 播放器
- 自定义控件中使用ToolStripProfessionalRenderer 是啥作用?
- 菜鸟求救! 一个简单的计算器
- 3个label,做的tab标签,怎样能统一管理他们的事件。求个大哥们个办法!
- System.InvalidCastException: The data value could not be converted for reasons other than sign mismatch or data overflow.
- 一个麻烦的问题!如何远程控制某台机器!就象qq这样
- MSDN安装问题
{
if (dataGridView1.Rows[i].Cells[0].Value != null)
{
MessageBox.Show(dataGridView1.Rows[i].Cells[1].Value.ToString());
}
}
{
CheckBox cb=(CheckBox)dataGridView1.Rows[i].Cells[0].FindControl("CheckBox1")
if (cb.Checked==true)
{
MessageBox.Show("选中");
}
}
你说的是有道理,但问题是当datagridview没有与数据源绑定的情况下,应该如何判断呢?
guodawu() 的方法经测试行不通,不知道有没有更好的办法。
foreach(DataGridItem i in mygrid.Items)
{
if(((CheckBox)i.FindControl("chkbox")).Checked == true)
{
((TextBox)i.FindControl("txt_firname")).Visible = true;
((TextBox)i.FindControl("txt_lastname")).Visible = true;
((Label)i.FindControl("lab_firname")).Visible = false;
((Label)i.FindControl("lab_lastname")).Visible = false;
}
}
{
if (!IsPostBack) //这里原来没有加判断,所以……
{
gvApprove.DataSource = ds.Tables[0].DefaultView;
gvApprove.DataBind();
}
if (cstate.ToString() == "Checked")
....winform很BT ...
经验证,wlovenet(喝了这杯酒大家就是兄弟)给出的方法是正解,谢谢兄弟!