protected int GetSelectedDataKeyID(Grid grid)
{
int id = -1;
int rowIndex = grid.SelectedRowIndex;
if (rowIndex >= 0)
{
if (grid.DataKeys.Count == 0) return id;
id = Convert.ToInt32(grid.DataKeys[rowIndex][0]);
}
return id;
}
protected string GetSelectedDataKey(Grid grid, int dataIndex)
{
string data = String.Empty;
int rowIndex = grid.SelectedRowIndex;
if (rowIndex >= 0)
{
data = grid.DataKeys[rowIndex][dataIndex].ToString();
}
return data;
}