I am using a recordstore to store some data,and each data is being shown in form of list elements.In my application,i am having a feature in which i can delete a particular list element.When i perform this action,item is getting deleted from the list but it is not working with the record. I dont know why? Can any one help me? My code snippet is:
int x=list.getSelectedIndex();
list.delete(x);
try
{
rs_store.deleteRecord(x);
}
catch(Exception error)
{
System.out.print("error");
}
display.setCurrent(list);
Thanks in advance
If the indices of the items in your
Listare supposed to correspond with the indices of items in yourRecordStore, then your problem may be down to the fact thatRecordStoreentries are 1-based, not 0-based.So element 0 in your list will correspond to record 1 etc.