日期:2014-05-17  浏览次数:21230 次

C# superGridControl控件的用法
我想删除superGridControl中选中的行,
  private void 删除ToolStripMenuItem_Click(object sender, EventArgs e)
        {
DialogResult result = MessageBox.Show("是否删除图片?", "删除图片",MessageBoxButtons.YesNo, MessageBoxIcon.Information);
            if (result == DialogResult.Yes)
            {
 SelectedElementCollection col = this.ListGrid1.PrimaryGrid.GetSelectedRows();
               
                MessageBox.Show(col.Count.ToString());
                if (col.Count > 0)
                {
                    GridRow row = col[0] as GridRow;
                    MessageBox.Show(row.RowHeaderText);
                }
                //manager.DeleteImageById(
            }
        }可是的到的行书是0,为什么?到底如何得到选中的行啊!

------解决方案--------------------
可是的到的行书是0,是不是没有数据?
------解决方案--------------------
估计你点删除ToolStripMenuItem_Click,没有选择行