.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SPD Adding Joined Subview Stretches Parent Columns

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :C#

In SharePoint Designer, added a Linked Source Data View to a page.  After adding the Data View, I'm adding a row to the table. 

Formatting looks perfect at this point.

Once I add a Joined Subview to the new row in the Data View, the parent Data View columns are being streched out.

My goal is to have a parent row, with a child row spanning the table.

Any suggestions? 



View Complete Post

More Related Resource Links

Adding Multiple Columns and Rows in GridView without using a Database

This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.

dynamically adding sql server columns based on number of files in fileuploader


I want to create a new table to sql database at runtime.  The column names would be "Name", "Date", "Event".  I would also like to have one more column name "Image" but the problem is that since the amount of images will vary, I want the application to count the amount of files in the Multiple fileuploader and then add a image column to the table for the respected amount of files. 

For example if i am uploading 3 files in the multiple fileuploader, the names should be "Name", "Date", "Event", "Image1", "image2", Image3"

I also would like that table name to be name dynamically from the textbox Name when the user enters the information.


I have the following code to make a new table, but I dont know how to name the fields at runtime like previously asked please help!!!


Dim objConn As New SqlConnection("Server=<servername>;uid=<userid>;pwd=<password>;database=master")


this.controls.add - not always adding to parent form

My current code (snippet below) iterates through user info and adds the same custom control to a form based on how many "Meals" (1-6) the user has selected.  It appears that all even # controls (the second, fourth and sixth) are added to the previously added control, rather than the parent form, when I later try to dispose the controls by iterating through this.controls, only 1, 3 and 5 appear, the others appear as children to 1, 3 & 5. I've reduced controls size, etc. to make sure they're not overlapping (if that can force inheritence?) but no luck.  Anyone have suggestions on what to look at or other guidance? public void drawMealPanel(Meal m, int x, int y) { Controls.MealDisplay md = new Controls.MealDisplay(m); md.Name = m.name; md.Tag = m.id.ToString(); md.Left = x; md.Top = y; md.DragDrop += new System.Windows.Forms.DragEventHandler(this.MealView_DragDrop); md.DragEnter += new System.Windows.Forms.DragEventHandler(this.MealView_DragEnter); this.Controls.Add(md); }

Conditional formatting on a joined subview using SharePoint Designer 2007 does not work

I have 2 SharePoint lists, one is a parent task list and the other a child task lists.  In SharePoint Designer 2007 I have created a combined datasource from these 2 lists.  From there I created a new ASPX page inserting the parent list as a dataview and the child as a subview.  So far so good, all is functioning as you would expect.    Now I need to apply conditional formatting to cells and rows in both the parent and child lists.  I can create a very simple condition on a row or cell of the parent list such as "If ID Equals '2988' format the background color as green" but no conditional formatting appears for the row where ID = 2988.  Incidentally, if I change the condition to "not equals 2988" the background changes to green. The line in the code view of Designer appears as follows:  <xsl:if test="../../../Rows/Row/@ID = '2988'">background-color: #00FF00;</xsl:if> I've seen this question asked here and in blogs but never answered.  If anyone has a solution, I would love to know what it is. Thanks; Dave  UPDATE:  it doesn't seem to matter if you add the additional fields as a joined subview or not.  If I add 2 data views, both using the linked data source which is configured to JOIN the contents of the data sources the conditional formatt

Removing columns inherited from parent not working

I'm trying to install a couple of custom workflow task content types that are based on the standard workflow task type, but I want to remove some of the attributes defined on the std worfklow task type.  Per the MSDN online info you can use the <RemoveFieldRef/> tag in your XML content type definition file to remove such columns.  For some reason mine does not appear to work, however.  In addition to not removing the columns specified by the <RemoveFieldRef/> tags, it also does not create my custom "Comments" column -- It DOES create the custom "Respoinse" column. The following are my XML definition files for the feature (which installs fine and the content types are created, but the columns I want to remove still show up).  Any idea what I'm missing to remove these columns from the custom types?  I pulled the IDs for the columns I want to remove from the std type definition XML under the 12-hive FEATURES folder Type Definition File <?xml version="1.0" encoding="utf-8"?> <!-- See this blog for specifics: http://www.scribd.com/doc/2278897/Part-4-Custom-Workflow-Forms-TaskEdit-Form --> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentType ID="0x010801003D9E4ED01F024d28AF0056E2654CECB0" Name="MoreInfo Task" Group="

Filter Joined subview.

Scenario: I have two list and wanted to display it in a webpart dataview . By using linked datasources i'm able to joined them . But filtering isnt working .

Filter works for first list not for the second list columns? why is it so?

Thanks a million in advance.

Best practice for adding parent-child related ModelVisual3D elements



I have build a WPF application which loads some 3D models. Some of the models have a parent-child relationship, e.g. a tree has some branches and each branch has leaves.

Now I created a class for each type: tree, branch and leave. From within a "branch" object I want to add the leaves with a "AddLeaves()" method. But I don't know what's the best way to access the ViewPort3D object, to which I can add the "leave" objects.

Do I have to implement a "ViewPort3D" member on each class which saves the reference to the viewport? Or is there a easier way to achieve this? Perhaps with DependencyProperies?

How can I access the "children" property of the ViewPort3D object the easiest way?

Please help!!!

Adding columns to content type

I am usine the Bugs Database site template.  On the Bugs List I want to add some additional columns.  If I add those columns to the content type, am I changing the content type throughout the site collection for anyone else that uses the Bugs List, or is my change just local to my site?
There are no mistakes; every result tells you something of value about what your are trying to accomplish.

Adding child nodes to its parent



I would like to add child nodes to its parents using pattern visitor to build tree .

 public interface IVisitor
        void Visit(File file);
        void Visit(Level_1 level);
        void Visit(Level_2 level);
        void Visit(Level_3 level);
        void Visit(Level_4 level);
        void Visit(Level_2 level);
        void Visit(Root root);

 public class TreeViewBuilderVisitor : IVisitor
        private TreeNode _treeNode;

        public TreeNode TreeNode
            get { return _treeNode; }
            set { _treeNode = value; }
        private TreeView _treeview;

        public TreeViewBuilderVisitor(TreeView treeview)
            _treeview = treeview;

        public void Visit(File file)
             TreeNode faTreeNode = new TreeNode(file.Name);

        /// <summary>
        /// </summary>

Adding columns to existing content types - not updating

We deployed site columns and content types through xml definitions in features. When we update the content types by adding a new column, new columns do appear in SharePoint Designer 2010 but when pages are created from those page layouts, columns are not visible.

We see this in 2007 and found some solutions but these are code-base. Any alternative that guide us to make changes in the XML or any other file?

Same issue for 2007: 


Parent Columns and Child Columns don't have type-matching columns.



i am making  relation between two datatables and m getting this error

in this ds.Tables(0).Columns("In_ID") datatype is string

ds.Tables(1).Columns("row_id") datatype is integer

how i do the type casting here to make dataset relation

ds.Relations.Add("Rel_1", ds.Tables(0).Columns("In_ID"), ds.Tables(1).Columns("row_id"), True)

Microsoft.SharePoint.SPException raised when adding Columns to List



In my Site Collection root web site, I have created a new Task list under Site Actions -> Create.

This Task list creates the default SharePoint 2010 Task List with two content types, Task and Summary Task.

However, If I go under List Settings -> Columns, Add from existing site columns, the following Exception is raised in the ULS Logs:

Microsoft.SharePoint.SPException: Field type CHOICE is not installed properly. Go to the list settings page to delete this field.   
 at Microsoft.SharePoint.SPFieldCollection.CreateSPFieldFromSafeArray(Int32 index)   
 at Microsoft.SharePoint.SPFieldCollection.CreateSPField(Int32 ifld)   
 at Microsoft.SharePoint.SPFieldCollection.EnsureSPField(Int32 index)   
 at Microsoft.SharePoint.SPFieldCollection.ItemAtIndex(Int32 iIndex)   
 at Microsoft.SharePoint.ApplicationPages.AddFieldToContentTypePage.OnLoad(EventArgs e)   
 at System.Web.UI.Control.LoadRecursive()   
 at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Can anyone provide any suggestions as to what may be causing this?



SSRS 2008 - Excel Export adding unwanted total columns to spreadsheet



I have a SSRS 2008 report which has 3 column groups which when i export to Excel the resulting excel spreadsheet has an additional total column for each of the groups.  I dont have this displayed in the report and dont want it displayed in teh excel export, is there anyway to turn this off?

I've had a search of this forum but so far i've been unable to find a solution(or someone else having the same problem)


Programatically adding the "SummaryLinks" type column to the Site columns list



Can anyone help me with the sample code to programatically add the "SummaryLinks" type column to the Site columns list.



How to aggregate with a joined subview in Sharepoint Designer



I have a data view web part which uses a "Linked Sources" as Datasource. I have created a master table, then created the joined subview inside the data view web part as usual. Instead of showing the detail data in the subview, I just showed the number of rows as this is what I am interested in.

The master table is grouped by a specific column, so here is a representation of what I have:

 FIELD_X   FIELD_Z   NUMBER(count of rows in the subview)
FOOTER_A (count of rows in the master table)

 FIELD_X etc...

the count of rows in the subview is given by the following:

Now, in the footer I want to show the total count of rows of the subview , not the count of rows of the master table. How can I get the count of rows of the subview based on the grouping of the master table?

More specifically the problem is that the subview cannot be directly link to the group header; it can be joined to a field in the master table which must then be filtered based on the group header.


Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

GridView Parent Child View with JQuery Effects

I was just checked how to add some more cool effects to the GridView control using JQuery. In this post I will display parent-child data in the GridView control with some help of the wonderful JQuery library.

Let's first populate the GridView control.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend