Posted on: 3/22/2012 1:34:00 PM | Views : 483

Hi,
I have an ASP.NET webpage which contains a datalist and a nested Gridview.
The gridview is populated from an SQL Server database which works fine.

I would like to be able to show only the first 6 rows of the GridView, and then hide any remaining rows.
Please note I do not want to remove them, just hide them so I can access/display that at a later time.
My gridview is currently populated like so:
private void BindGrid(GridView GridView, int questionId, string questionType) { // get the answerID and title for the current question. DataTable answersDataTable = new DataTable(); answersDataTable = GetData.GetAnswerResponses(questionId); GridView.DataSource = answersDataTable; GridView.DataBind(); } How can I improve the statement above to hide GridView rows at index 6 and above? Thanks
...

Go to the complete details ...