データを含む GridView があります。この GridView の最初の列は "SELECT" 列です。
ユーザーが SELECT をクリックすると、行全体が強調表示されます。
このクリック アクションに関するイベントがあります。
protected void gvShows_SelectedIndexChanged(object sender, EventArgs e)
{
}
基本的に私がやりたいことは、SELECTED 行ごとに、列の値を抽出したいです。
- 情報源
- 表示ID
- エピソードID
**ここに問題があります:
string dataSource = "";
int showId = 0;
int episodeId = 0;
foreach (DataRow row in gvShows.Rows)
if (the row is selected/highlighted then...)
{
dataSource = the value under column "dataSrouce" for this ROW.
showId = the value under column "showId" for this ROW.
episodeId = the value under column "episodeId" for this ROW.
}
誰か私に手を貸してくれませんか?