这是我的代码:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
try
{
int IndexTypeID = 5;
mobjORACLE = new DatabaseObjects.OracleDBCalls();
DataSet dsetPortfolio = mobjORACLE.GetORACLEDataSet(IndexTypeID, "v_indextypeid", "cv_1", "fn_getportfolio");
if (dsetPortfolio.Tables[0].Rows.Count > 0)
{
ViewState["gvPortfolio_DataSource"] = dsetPortfolio.Tables[0];
gvPortfolio.DataSource = dsetPortfolio.Tables[0];
gvPortfolio.DataBind();
gvPortfolio.Visible = true;
//dsetPortfolio.Tables[0].Rows[0]["cashreserve"];
//ViewState["gvPortfolio_DataSource"] = gvPortfolio.DataSource;
gvPortfolio.Attributes.Add("bordercolor", "#999966");
}
}
catch (Exception ex)
{
throw ex;
}
}
}
在 gvPortfolio 中,我得到了一个数据表,其中按名称分配了一个列。现在的问题是,我需要总结列并在页脚中显示其结果。有人可以帮助我摆脱这种情况。