Hi Suraj Borade,
First i will say that its not a best prectice, if you really want then you can achieve it like...
1:- before inserting get the max index and add 1 which will be your new index, in this way you will not get the index like 1,2,3,4,5 but it will prevent you to create a duplicate index.
2:-Get the list of index in asc order, then Isfound =false then treverse the loop like if(Isfound =false and lstindex.list.current.tablename.index > lstindex.list[lstindex.list.current.Rownumber-1].tablename.index+1)
then Isfound var_index=lstindex.list.current.tablename.index +1 and Isfound=true
dont forget to pass the loop if the currentrownumber =0
I hope it will help you.
Thanks
Rajendra
First i will say that its not a best prectice, if you really want then you can achieve it like...
1:- before inserting get the max index and add 1 which will be your new index, in this way you will not get the index like 1,2,3,4,5 but it will prevent you to create a duplicate index.
2:-Get the list of index in asc order, then Isfound =false then treverse the loop like if(Isfound =false and lstindex.list.current.tablename.index > lstindex.list[lstindex.list.current.Rownumber-1].tablename.index+1)
then Isfound var_index=lstindex.list.current.tablename.index +1 and Isfound=true
dont forget to pass the loop if the currentrownumber =0
I hope it will help you.
Thanks
Rajendra