Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
public string GetfilenameImport()
        {
            string str = string.Empty;
            foreach (GridViewRow gvrow in GridImport.Rows)
            {
                str += gvrow.Cells[0].Text + ";";
            }
            return str;
        }


I have used this function to get all the values from 1st column...But I have used gridview page size as " PageSize="4" " .If I add 10 rows it will only retrieve the first 4 values .How to get all values from 1st column,,
please help
Posted

1 solution

You can't: if you have set a page size of 4 items, that that is all that the gridview will fetch - or there would be very little point in using paging to reduce the amount of data that needs to be transferred in the first place!

If you want all rows, then you have to go back to the original data source that the grid view was getting it's data from: the grid view itself can only show you the current page of values.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900