访问从数据源的完整的DataRow在ListView ItemDataBound事件处理程序 [英] Accessing the full DataRow from the DataSource in a ListView ItemDataBound event handler

查看:159
本文介绍了访问从数据源的完整的DataRow在ListView ItemDataBound事件处理程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是它在所有可能的一个ListView ItemDataBound事件处理程序中获得充分的DataRow该事件的访问?我需要做大量的处理,为整个行具有约束力,但在我没有实际使用在显示器本身的数据行使用的数据项的值。

Is it at all possible within a ListView ItemDataBound event handler to gain access to the full DataRow for that event? I need to do a lot of processing for the entire row on binding, but using data item values in the datarow that I am not actually using in the display itself.

推荐答案

试试这个

DataRowView的博士=(DataRowView的)DataBinder.GetDataItem(e.Item);


dr.Item.ItemArray您可以访问整个行。

using dr.Item.ItemArray you can access the entire row.

这篇关于访问从数据源的完整的DataRow在ListView ItemDataBound事件处理程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆