The problem is that I don’t want the id(in the url) to be the primary key, I want to use another field in the database to be sent in the URL, but that does not seem to work.
Is there a fix in the solution I found or do I need another solution?
I want a whole row in the CGridView to become a link and send me to the same place as the view-button in CButtonColumn would. So I need to wrap each row in a link and in some way echo out the the url to that place.
When I use the code in my example above it does make each row a link, the problem is that it grabs the primary key from the db-table and puts that in the URL. I want to choose another db-field and put that in the URL instead.
Example:
this is how the url looks with the solution I found:
Has the listview slower performance then the gridview? the db-table contains over 100 000 rows. Also, is the listview easy to configure with search-functionality?
In terms of overhead, they’re the same - a single JS file. The only thing to slow the list view down is the complexity/details you add to it - extra css files, large images, complex JS computations etc.
I’ll assume you’re using pagination to display your grid/list - then there shouldn’t be any difference.
The search functions in the same way as the grid - IDataProvider.