How to insert data in a recordlist

How to insert data in a recordlist

  
Good day.

I'm currently creating an extension in C#.net. I have a function that will output a recordlst data type which ill use in my outsystems application. but im having trouble on how can i insert my extracted database data to the recordlist variable in the c# code.

this is a sample code.

public void MssGetCategoryList(out RLcategoriesRecordList ssCategogyList)
{
ssCategogyList = new RLcategoriesRecordList(null);

DTItems;
}


the "MssGetCategoryList" is the default function created by integration studio in it will output  a recordlist which is the "ssCategogyList".
Now i have my data filled in the "DTItems"  which is a DataTable. My question is how can I insert my data from "DTItems"  to ssCategogyList.

 
I already got it working after some trial and error codes.
I just can't find way how to delete this post. thanks.


Can you post a working sample code? this may be useful for others who might be asking the same question.

Shouah -

There's a "known answer" post in the forums for this already:

http://www.outsystems.com/forums/discussion/7358/tip-how-to-correctly-iterate-a-record-list-inside-an-extension/

J.Ja