G
gjnave
Guest
I have racked my brains for the ENTIRE day trying to figure out how I can delete a single row from within a child table.
This is my dataset structure:
Organization
Country
City
Ministry
Worker
Say that the Organization Table has One Entry, but the Country table has 3 entries (lets say Korea, USA, France) . And lets say that the City table has 3 entries under each of the 3 countries. (A total of 9 cities, which dont show together because they are related to different countries in the country table - or underneath different rows of the Country Table).
Now, i want to delete the city of Denver (which is underneath the USA entry in the Country table). So i navigate to the correct relation and tell it which row to delete (in this case row #2) --
**CODE**
dataset1.tables("country_city").rows(2).delete
**End of Code**
But aha! It didnt delete what I thought it should. Looking at the Datagrid, the row I want to delete being the 3rd down, you would think that that would be row #2.
But what is really happening is that by telling the progam to go to "country_city" , Im not just getting the cities for the USA, but for all the other countries also. So the index is not just for USA but for all the countries.
SO heres the question. How can I tell the program to not include everything beneath all the rows in the Country table, but to only include whats beneath a specific row in the Table (Namely Denver)?
Thank You
This is my dataset structure:
Organization
Country
City
Ministry
Worker
Say that the Organization Table has One Entry, but the Country table has 3 entries (lets say Korea, USA, France) . And lets say that the City table has 3 entries under each of the 3 countries. (A total of 9 cities, which dont show together because they are related to different countries in the country table - or underneath different rows of the Country Table).
Now, i want to delete the city of Denver (which is underneath the USA entry in the Country table). So i navigate to the correct relation and tell it which row to delete (in this case row #2) --
**CODE**
dataset1.tables("country_city").rows(2).delete
**End of Code**
But aha! It didnt delete what I thought it should. Looking at the Datagrid, the row I want to delete being the 3rd down, you would think that that would be row #2.
But what is really happening is that by telling the progam to go to "country_city" , Im not just getting the cities for the USA, but for all the other countries also. So the index is not just for USA but for all the countries.
SO heres the question. How can I tell the program to not include everything beneath all the rows in the Country table, but to only include whats beneath a specific row in the Table (Namely Denver)?
Thank You