Hi Friends,
In this post, we discuss how we can retrieve all selected(marked) records of a datasource or retrieve marked records form Grid.
For this purpose follow the steps listed below.
int recordsCount;
TabPet TabpetLocal;
super();
recordsCount = TabPet _ds.recordsMarked().lastIndex(); // Total number of marked records.
TabpetLocal= TabPet_ds.getFirst(1);
while (TabpetLocal)
{
info(TabpetLocal.Name +" " +TabpetLocal.ID);
TabpetLocal= student_ds.getNext();
}
Happy
Daxing...
In this post, we discuss how we can retrieve all selected(marked) records of a datasource or retrieve marked records form Grid.
For this purpose follow the steps listed below.
- Create a new table named "TabPet" that contains two string fields i.e. Name & ID.
- Create a new form and add the newly created "Student" table in the datasource node.
- Next create a new button on the form, set its multiselect property to "Yes" . Now override the clicked method of the button and add the following code.
int recordsCount;
TabPet TabpetLocal;
super();
recordsCount = TabPet _ds.recordsMarked().lastIndex(); // Total number of marked records.
TabpetLocal= TabPet_ds.getFirst(1);
while (TabpetLocal)
{
info(TabpetLocal.Name +" " +TabpetLocal.ID);
TabpetLocal= student_ds.getNext();
}
Happy
Daxing...
Good to know...!
ReplyDeleteThanks...
ReplyDeleteNot working
ReplyDeleteHow this below line compiled for since there is no data source method like that
ReplyDeleterecordsCount = TabPet _ds.recordsMarked().lastIndex();