データビュー内を検索する

int rowIndex = gcMultiRow1.CurrentCellPosition.RowIndex;

DateTime t = (DateTime)gcMultiRow1[rowIndex, “gcDateTimeCell1”].Value;

TimeSpan ts = new TimeSpan(1, 0, 0, 0);

string dateString = (t - ts).ToString();

DataRow[] foundRows = var.dataViewMain.Table.Select(”hiduke=#” + dateString + “#”);



if (foundRows[0][”Zandaka”].ToString() != “”)

gcMultiRow1.SetValue(rowIndex, “textBoxCell34”, foundRows[0][”Zandaka”].ToString());

}

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です