Here is my gridview: <asp:GridView AllowPaging="true" ID="grvReport"> <Columns> <ItemTemplate> <asp:GridView AllowPaging="true" ID="grdDetail" OnPageIndexChanging="grdDetail_PageIndexChanging"> <Columns> <ItemTemplate> //Some control </ItemTemplate> </Columns> </asp:GridView> </ItemTemplate> </Columns> </asp:GridView>
protected void grdDetail_PageIndexChanging(object sender, GridViewPageEventArgs e) { GetData(new Pager(int.MaxValue, 0)); BA_WebGPS.UIL.Controls.GridView grvDetail = (sender as BA_WebGPS.UIL.Controls.GridView); int rowIndex = ((GridViewRow)grvDetail.Parent.Parent.Parent).RowIndex; GridIndexDetail = rowIndex; long vehicleID = long.Parse(grvReport.DataKeys[rowIndex].Value.ToString()); grvDetail.PageIndex = e.NewPageIndex; grvDetail.DataSource = BaseManager.LstFullDataDetail.Where(x => x.VehicleID == vehicleID).ToList(); grvDetail.DataBind(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)