T
Tim Mackey
hi,
i've started playing with the VS strongly typed datasets and i'm doing an experiment to see if they will be a viable replacement for my business objects.
the typed dataset contains a class for each of my row types, and i want to add 2 variables to this class (it's simulating files and folders, and i want to have a ChildFiles and ChildFolders arraylist added to each FolderRow, to give fast/easy hierarchical navigation)
i can do it by modifying the code directly, but that isn't so good for when the code gets re-generated by VS. so i created a class to derive from the FoldersRow class, but i can't promote any of the existing FolderRow objects (once they get filled by a dataAdapter) to my subclass type (listed below). i get 'Invalid cast' run time errors, even though it compiles ok.
public class FoldersRowHierarchy : StrongTypedDataSet.FoldersRow
{
public ArrayList childSections = new ArrayList();
public ArrayList childPages = new ArrayList();
internal FoldersRowHierarchy (DataRowBuilder rb) : base(rb) {}
}
i really appreciate any help anyone can give on this.
tim mackey.
\\ email: tim at mackey dot ie //
\\ blog: http://tim.mackey.ie //
67d0ebfec70e8db3
i've started playing with the VS strongly typed datasets and i'm doing an experiment to see if they will be a viable replacement for my business objects.
the typed dataset contains a class for each of my row types, and i want to add 2 variables to this class (it's simulating files and folders, and i want to have a ChildFiles and ChildFolders arraylist added to each FolderRow, to give fast/easy hierarchical navigation)
i can do it by modifying the code directly, but that isn't so good for when the code gets re-generated by VS. so i created a class to derive from the FoldersRow class, but i can't promote any of the existing FolderRow objects (once they get filled by a dataAdapter) to my subclass type (listed below). i get 'Invalid cast' run time errors, even though it compiles ok.
public class FoldersRowHierarchy : StrongTypedDataSet.FoldersRow
{
public ArrayList childSections = new ArrayList();
public ArrayList childPages = new ArrayList();
internal FoldersRowHierarchy (DataRowBuilder rb) : base(rb) {}
}
i really appreciate any help anyone can give on this.
tim mackey.
\\ email: tim at mackey dot ie //
\\ blog: http://tim.mackey.ie //
67d0ebfec70e8db3