Home > Net >  C # a paging controls how to obtain the total number of records?
C # a paging controls how to obtain the total number of records?

Time:11-27

I in an article written for the paging dataGridView in see,
PageSize sqlString="select top" + + + "* from" tablename + "where ID in (select top" + pageSize + ID "from" + tablename + "order by ID DESC) order by ID DESC";
Query the database using the above SQL statement to fill the dataset, with the following statement to get the total number of records
RecordCount=the Convert. ToInt32 (daset. Tables [0]. Rows [0] [0]).
Daset to fill good dataset,
I understand data for line 1 column 1, why is the total record? Always record should not be used rows. Count? Check help comes up blank, want to please know dear friends said said, thank you!

CodePudding user response:

I think I should write was wrong, it is only the first line of the first column of the data

CodePudding user response:

reference 1st floor muyiliu response:
I think I should write was wrong, that's just the first line of the first column of data

The test is total number of records in the database

CodePudding user response:

Is this position is to record the total number of records

CodePudding user response:

reference muyiliu reply: 3/f
could it be that this position is to record the total number of records?

To tell you by the way, that's true!
  •  Tags:  
  • C#
  • Related