我想做一些类似的事情,我们在ASP.NET中所做的事情,我们在gridview中解析所有行,并将特定值分配给连续的特定单元格,该值将匹配的任务ID作为当前ID。

这必须在调度程序计时器对象的tick函数中发生。由于我为GridView中的每一行都有一个启动计时器按钮列。单击特定行的开始计时器按钮,我必须启动其计时器并在该行中的单元格中显示。同样,可以并行运行多个计时器。

为此,我需要能够检查特定任务的任务ID,并在所有具有计时器的任务中使用更新的时间来更新单元格值。

timepan序列= someValue;字符串CurrentTaskId =“ 100”; foreach(radgridview1.rows in radgridview1.rows)//在这里我也尝试了radgridview1.childrenoftype(),但它具有null {if(((row.datacontext as task).taskId == currentTaskId)row.cell.cell.cell.cell.cells [2] .content = content = content = content = a.tasktimeremain.tostring(); }

有人可以让我知道如何使用Telerik RadgridView获得此功能?

欢呼,赛义德。

有帮助吗?

解决方案

这对我有用 - 使用Telrik Wincontrols Q22009。

foreach (GridViewRowInfo row in this.radGridView1.MasterGridViewTemplate.Rows)
{
    if (row.Cells["colId"].Value.ToString() == CurrentTaskId)
    {
        row.Cells["colTimerValue"].Value = a.TaskTimeRemaining.ToString();
    }
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top