I had been running back and forth for an issue related to customization of DataFormWebPart. The main aim of the webpart was to reduce the coding - implementing a new webpart for just displaying the content from an existing list, in a tabular format.
I made a nice look & feel with the DFWP, but unfortunately, I was not able to bring items from the folder. My client desperately wanted to maintain items with same name in the list for different version of artifacts. Again it should be displayed in the root level while viewing. SharePoint's Views provide an option to list all list items in the same level (without showing the folder names).
To provide a solution to this issue using DFWP, I created another view and opened the ASPX file in SharePoint Designer. Now, I have answers to my questions. I can make the similar view using the DFWP.
As the designer writes most of the code, we do not realize to go deep into core of the features. By default the designer will not add the Scope attribute to the SPDataSource control.
<SharePoint:SPDataSource runat="server" DataSourceMode="List" SelectCommand="" UpdateCommand="" InsertCommand="" DeleteCommand="" UseInternalName="True" ID="Premium2" Scope="RecursiveAll" >< SelectParameters>
To retrieve all items from a list in C# use the ViewAttributes property of SPQuery object.
oQuery.ViewAttributes = "Scope=\"Recursive\"";
________________________________
Anbu Thangarathinam
9482e784-a1f3-4a99-a075-d4b2644dc720|0|.0
Sharepoint
Sharepoint