protected void Grid1_RowCommand(object sender, ExtAspNet.GridCommandEventArgs e)
 {
     if (e.CommandName == "Action1" || e.CommandName == "Action2")
     {
         labResult.Text = String.Format("你点击了第 {0} 行,第 {1} 列,行命令是 {2}", e.RowIndex + 1, e.ColumnIndex + 1, e.CommandName);
     }
 }
Ejemplo n.º 2
0
 protected void Grid1_RowCommand(object sender, ExtAspNet.GridCommandEventArgs e)
 {
     if (e.CommandName == "Action1" || e.CommandName == "Action2")
     {
         object[] keys = Grid1.DataKeys[e.RowIndex];
         labResult.Text = String.Format("你点击了第 {0} 行,第 {1} 列,行命令是 {2}", e.RowIndex + 1, e.ColumnIndex + 1, e.CommandName) +
                          "<br />" +
                          String.Format("当前行数据 - 编号:{0},姓名:{1}", keys[0], keys[1]);
     }
 }
 protected void Grid1_RowCommand(object sender, ExtAspNet.GridCommandEventArgs e)
 {
     if (e.CommandName == "CheckBox1")
     {
         bool checkState = Convert.ToBoolean(Grid1.Rows[e.RowIndex].States[e.ColumnIndex]);
         Alert.ShowInTop(String.Format("你点击了第 {0} 行,第 {1} 列,选中状态:{2}", e.RowIndex + 1, e.ColumnIndex + 1, checkState));
     }
     else if (e.CommandName == "Action1" || e.CommandName == "Action2")
     {
         Alert.ShowInTop(String.Format("你点击了第 {0} 行,第 {1} 列,行命令是 {2}", e.RowIndex + 1, e.ColumnIndex + 1, e.CommandName));
     }
 }