我在listview_itembound事件的listview中使用gridview我根据要求获取记录bt prbm是我在我的gridview中有页脚我必须显示一些记录bt数据在我的网格中不可见请帮助我告诉我我错了以下是我的代码:
protected void ListView1_ItemDataBound(object sender, ListViewItemEventArgs e)
{
if (e.Item.ItemType == ListViewItemType.DataItem)
{
ListViewDataItem item = (ListViewDataItem)e.Item;
GridView grdview = (GridView)item.FindControl("GridView1");
Label lblenqid = (Label)item.FindControl("Label2");
Label lblclientname = (Label)item.FindControl("Label3");
//string enquiryid = lblenqid.Text;
DateTime ArrivesOn = DateTime.Parse(txtstartdate.Text);
//GridView grdvw = (GridView)ListView1.FindControl("GridView1") as GridView;
objHotel.Tour_Detail(grdview, ArrivesOn,lblclientname.Text,lblenqid.Text);
//objHotel.Tour_DetailVehiclePackageCost(grdview, lblenqid.Text);
}
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Footer)
{
GridView grdview1 = (GridView)e.Row.FindControl("GridView1");
Label lblenqid = (Label)e.Row.FindControl("lblenqid1");
Label lblname = (Label)e.Row.FindControl("lblname");
DateTime ArrivesOn = DateTime.Parse(txtstartdate.Text);
objHotel.Tour_Detail(grdview1, ArrivesOn, lblname.Text, lblenqid.Text);
//objHotel.Tour_DetailVehiclePackageCost(grdview1, lblenqid.Text);
}
}