如何从一个数据视图的列的值? [英] How to get a value from a column in a DataView?

查看:177
本文介绍了如何从一个数据视图的列的值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我定义为数据视图:

 数据视图dvPricing = historicalPricing.GetAuctionData()默认视图。 

这是我已经试过了,但它返回的名称,而不是在列中的值:< 。/ p>

  dvPricing.ToTable()列[GrossPerPop]的ToString(); 


解决方案

您需要指定您想要的行获得的价值。我可能会沿着table.Rows [指数] [GrossPerPop]的线条更。的ToString()


I have a dataview defined as:

DataView dvPricing = historicalPricing.GetAuctionData().DefaultView;

This is what I have tried, but it returns the name, not the value in the column:

dvPricing.ToTable().Columns["GrossPerPop"].ToString();

解决方案

You need to specify the row for which you want to get the value. I would probably be more along the lines of table.Rows[index]["GrossPerPop"].ToString()

这篇关于如何从一个数据视图的列的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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