Get Data Value From ListView ItemDataBound

前端 未结 4 1815
眼角桃花
眼角桃花 2021-01-04 05:24

I\'m sure I\'ve done this before but really cant remember how.

In the ItemDataBound event of a ListView I need to get the actual data value. I cant seem to find it i

4条回答
  •  孤街浪徒
    2021-01-04 06:05

    protected void Score_ItemDataBound(object sender, Telerik.Web.UI.RadListViewItemEventArgs e)
    {
        if (e.Item is RadListViewItem)
        {
            RadListViewDataItem item = e.Item as RadListViewDataItem;
            object dataItem = ((System.Data.DataRowView)(((RadListViewDataItem)e.Item).DataItem)).Row.ItemArray[2].ToString();
            string raetest = Convert.ToString(dataItem);
        }
    }
    

提交回复
热议问题