- Suppose we have a database table such as:
CREATE TABLE [dbo].[tbl_device]( [id] [smallint] IDENTITY(1,1) NOT NULL, [name] [varchar](50) NOT NULL, [active] [bit] NULL );
- Table contains ~300 entries, where column [active] can have only 1 or 0 ([bit] data type).
- Using the Gii Code Generator, we generate a model class.
- Now, using this model and CGridView widget with sorting capability, print out the contents of the table on the page.
- Sort by 'Active' column.
- Then list 5-10 pages using the 'Next>' button of the 'pager'.
On some point we will see, that although page number is changed, the data in the grid is the same as it was on the previous page.
Moreover, this set of data (10 items by default) appears on several pages.
- Yii 1.1.11
- MS SQL Server 2012 Express
- IIS 7
- Windows 7
Will appreciate any help and suggestions.