The id field sequences like this so that any referencing items don't get
screwed up.
You would need to renumber the sequence, that's a bad thing. What is it
your wanting to do actually?
If you simply query the items they are sorted by id value.
On Thursday, June 23, 2016 at 12:22:57 PM UTC+3, sense red wrote:
>
> Hi Everyone,
>
> I am facing the issue like.
>
> I have created the database table with
> db.define_table('testcases',Field('Testcase_Name',requires=IS_NOT_EMPTY()),
> Field('Time_stamp','datetime',requires=IS_NOT_EMPTY()))
>
> controller code:
>
> def testcases():
> form = SQLFORM(db.testcases).process()
> grid = SQLFORM.smartgrid(db.testcases)
> return locals()
>
> I have inserted 10 testcases in to above "testcase" table, If I delete the
> 5th testcase then the sequence of the row id's are missing for
> example:(1,2,3,4,5,6,7,8,9,10) after deleting the 5th row then it was
> displaying as (1,2,3,4,6,7,8,9,10)
> my requirement is to display as(1,2,3,4,5,6,7,8,9).
>
> Please give me the solution to resolve the issue.
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.