1
在我分頁GridView控件(包含在一個UpdatePanel)綁定到ObjectDataSource的,我有一個OnDataBound事件不同,單ASP.NET GridView.Rows行爲與.NET
protected void GridView1_DataBound(object sender, EventArgs e)
{
foreach (GridViewRow row in GridView1.Rows)
{
// row isn't starting from the first row of current page in mono!
}
}
在.NET運行時,我GridView.Rows
總是給我在當前頁面的那些(即GridViewRow.DataItemIndex不會0
但其正確索引到它的數據源)。但在單聲道2.10.8上,無論我正在查看哪個頁面,這會給我0
!
然而,GridView.Rows [0] .DataItem返回相同的項目作爲.NET。這似乎是DataItemIndex中存在一個錯誤。
有沒有辦法使用.NET要解決它,並實現單上相同的行爲與.NET和仍然保持兼容性?
向單聲道郵件列表上。 – leppie
按照這個邏輯,.NET的問題應該在MSDN論壇上提出。 StackOverflow將完全無用! –
那麼你會有更好的目標觀衆。使用它,不要使用它。由你決定。 – leppie