I want to get the first 100 records from a DataSource
. I have tried but
it's not working.
if (p_ForExport) {
Session(this.gridData_Session) = ds.wsm_View_PurchaseOrderListForExport;
} else {
Session(this.gridData_Session) = ds.wsm_View_PurchaseOrderList;
}
divgrid.Visible = true;
gridPOList.DataSource = Session(this.gridData_Session);
gridPOList.Rows.Cast<System.Data.DataRow>().Take(100);
//tried this but it's not working
gridPOList.DataBind();
}