我尝试从网格中选择该行,并在文本框中显示该行以进行更新和删除。
我已经在DataGrid中尝试了此代码。它起作用了,但是当我在基础设施webdatagrid中使用它时,它却为空
protected void WebDataGrid1_SelectedIndexChanged(object sender, DataGridViewCellEventArgs e)
{
txtCode.Text = WebDataGrid1.Rows[e.RowIndex].Items[1].Value.ToString();
}
没有错误提示,但数据未显示在文本框中。
答案 0 :(得分:0)
尝试
/**
* computes the status of a task based on its fields
* @param {Task} param0
* @returns {Status}
*/
export const getTaskStatus = ({ startedAt, stoppedAt, pauses }) => {
if (stoppedAt) return TaskStatus.STOPPED; // does not show an error because it is typed as Status, but I have an error on the definition
if (startedAt && isPaused(pauses)) return TaskStatus.PAUSED; // same error
if (startedAt) return TaskStatus.RUNNING; // same error
return TaskStatus.NOT_STARTED;
};