[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3171
  • Last Modified:

I need to customize the list in the Sharepoint How to I am a newbie

I have a site in sharepoint 2010 and I have a student list I have two columns like student Id and name columns in the list inside the webpart. But what I need to do is I want to see the second column underneath the first column    instead of

-- LinkTitle    NewColumn1  

i need     LinkTitle
                NewColumn1

type of a look ..... i have added a table column but it did not seem to work my code is below for the web part i am talking about


see 1 and 2

            
<XmlDefinition>
                  <View Name="{7FA16D0E-34CE-4523-9EC9-6BDEB3105902}" DefaultView="TRUE" Type="HTML" DisplayName="newv" Url="/FatihSite/Lists/Student/newv.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/images/generic.png">
                        <Query/>
                        <ViewFields>
                        
1                                    <FieldRef Name="LinkTitle"/>
                              
2                              <FieldRef Name="NewColumn1"/>
                        </ViewFields>
                        <RowLimit Paged="FALSE">30</RowLimit>
                        <Toolbar Type="Standard"/>
                  </View>
            </XmlDefinition>
<DataFields>
</DataFields>
</WebPartPages:XsltListViewWebPart>

0
fatihdi
Asked:
fatihdi
  • 2
1 Solution
 
CloudedTurtleCommented:
This kind of formatting should happen in the Stylesheet portion of the web part not the XML Definition. In this particular section, you are only telling the web part which columns to query, not how they should be formatted.
Could you please send the stylesheet that is being used for the web part? (Should be another button "View Stylesheet" or something of the sort)
 
0
 
GeorgeGerguesCommented:
You can do that with SharePoint designer directly on the page.
You will loose the style inheritance though , so be carefull and make a copy of the page before you start editing.

Good Luck.
-George Gergues
0
 
fatihdiAuthor Commented:
Hi again sorry for the late reply I was extremely busy... first of all I have a Course Staff list and in this list i dont see a seperate css file. but i have AllItems.aspx, DispForm.aspx,EditForm.aspx pages my columns inside the web part are in these pages so inside this page for example Allitems.aspx below is the code for the page...  

============================================

<%@ Page language="C#" MasterPageFile="~masterurl/default.master"    Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:webpartpageexpansion="full" meta:progid="SharePoint.WebPartPage.Document"  %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="ApplicationPages" Namespace="Microsoft.SharePoint.ApplicationPages.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server">
      <SharePoint:ListProperty Property="TitleOrFolder" runat="server"/></asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageTitleInTitleArea" runat="server">
      <SharePoint:ListProperty Property="TitleBreadcrumb" runat="server"/>
      <SharePoint:UIVersionedContent UIVersion="4" runat="server">
            <ContentTemplate>
                  <span class="ms-ltviewselectormenuheader" runat="server">
                        <SharePoint:ListTitleViewSelectorMenu AlignToParent="true" id="LTViewSelectorMenu" runat="server" />
                  </span>
            </ContentTemplate>
      </SharePoint:UIVersionedContent>
</asp:Content>
<asp:content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">
      <SharePoint:RssLink runat="server"/>
</asp:content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageImage" runat="server">
      <SharePoint:ViewIcon Width="145" Height="54" runat="server"/></asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderLeftActions" runat="server">
<SharePoint:RecentChangesMenu runat="server" id="RecentChanges"/>
<SharePoint:ModifySettingsLink runat="server"/>
</asp:Content>
<asp:Content ContentPlaceHolderId ="PlaceHolderBodyLeftBorder" runat="server">
      <div height="100%" class="ms-pagemargin"><img src="/_layouts/images/blank.gif" width='6' height='1' alt="" /></div>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
            <WebPartPages:WebPartZone runat="server" FrameType="None" ID="Main" Title="loc:Main"><ZoneTemplate>
            <WebPartPages:XsltListViewWebPart runat="server" Description="description !!!!-----" ListDisplayName="" PartOrder="2" Default="TRUE" HelpLink="" AllowRemove="True" IsVisible="True" AllowHide="True" UseSQLDataSourcePaging="True" ExportControlledProperties="False" IsIncludedFilter="" DataSourceID="" Title="Course Staff" ViewFlag="25165825" NoDefaultStyle="" AllowConnect="True" DisplayName="All contacts" PageType="PAGE_DEFAULTVIEW" FrameState="Normal" PageSize="-1" PartImageLarge="" AsyncRefresh="False" Dir="Default" DetailLink="/FatihSite/Lists/Course Staff" ShowWithSampleData="False" ListId="05ee71e8-e865-4d0f-afe3-07e5d3f087b4" ListName="{05EE71E8-E865-4D0F-AFE3-07E5D3F087B4}" FrameType="Default" PartImageSmall="" IsIncluded="True" SuppressWebPartChrome="False" AllowEdit="True" ViewGuid="{6F5A1629-E0D6-468E-BFC6-1A90889D7746}" AutoRefresh="False" AutoRefreshInterval="60" AllowMinimize="True" WebId="00000000-0000-0000-0000-000000000000" ViewContentTypeId="0x" InitialAsyncDataFetch="False" GhostedXslLink="main.xsl" MissingAssembly="Cannot import this Web Part." HelpMode="Modeless" ListUrl="" ID="g_6f5a1629_e0d6_468e_bfc6_1a90889d7746" ConnectionID="00000000-0000-0000-0000-000000000000" AllowZoneChange="True" TitleUrl="/FatihSite/Lists/Course Staff" ManualRefresh="False" __MarkupType="vsattributemarkup" __WebPartId="{6F5A1629-E0D6-468E-BFC6-1A90889D7746}" __AllowXSLTEditing="true" __designer:CustomXsl="fldtypes_Ratings.xsl" WebPart="true" Height="" Width=""><ParameterBindings>
                  <ParameterBinding Name="dvt_sortdir" Location="Postback;Connection"/>
                  <ParameterBinding Name="dvt_sortfield" Location="Postback;Connection"/>
                  <ParameterBinding Name="dvt_startposition" Location="Postback" DefaultValue=""/>
                  <ParameterBinding Name="dvt_firstrow" Location="Postback;Connection"/>
                  <ParameterBinding Name="OpenMenuKeyAccessible" Location="Resource(wss,OpenMenuKeyAccessible)" />
                  <ParameterBinding Name="open_menu" Location="Resource(wss,open_menu)" />
                  <ParameterBinding Name="select_deselect_all" Location="Resource(wss,select_deselect_all)" />
                  <ParameterBinding Name="idPresEnabled" Location="Resource(wss,idPresEnabled)" />
                  <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
                  <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(core,noXinviewofY_DEFAULT)" />
                  <ParameterBinding Name="AddNewAnnouncement" Location="Resource(wss,addnewitem)" />
                  <ParameterBinding Name="MoreAnnouncements" Location="Resource(wss,moreItemsParen)" />
            </ParameterBindings>
<XmlDefinition>
                  <View Name="{6F5A1629-E0D6-468E-BFC6-1A90889D7746}" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" Type="HTML" TabularView="FALSE" DisplayName="All contacts" Url="/FatihSite/Lists/Course Staff/AllItems.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/images/contacts.png">
                        <Query>
                              <GroupBy Collapse="FALSE" GroupLimit="30">
                                    <FieldRef Name="Title"/>
                                    <FieldRef Name="Attachments"/>
                              </GroupBy>
                              <OrderBy>
                                    <FieldRef Name="Title"/>
                                    <FieldRef Name="FirstName"/>
                              </OrderBy>
                        </Query>
                        <ViewFields>
                              <FieldRef Name="LinkTitle"/>
                              <FieldRef Name="FirstName"/>
                              <FieldRef Name="Company"/>
                        </ViewFields>
                        <RowLimit Paged="TRUE">30</RowLimit>
                        <Aggregations Value="Off"/>
                        <ViewStyle ID="13"/>
                        <Toolbar Type="Standard"/>
                  </View>
            </XmlDefinition>
<DataFields>
</DataFields>
</WebPartPages:XsltListViewWebPart>

</ZoneTemplate></WebPartPages:WebPartZone>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderBodyAreaClass" runat="server">
<style type="text/css">
.ms-bodyareaframe {
      padding: 0px;
}
</style>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderPageDescription" runat="server">
<SharePoint:ListProperty CssClass="ms-listdescription" Property="Description" runat="server"/>
</asp:Content>
<asp:Content ContentPlaceHolderId="PlaceHolderCalendarNavigator" runat="server">
      <SharePoint:SPCalendarNavigator id="CalendarNavigatorId" runat="server"/>
  <ApplicationPages:CalendarAggregationPanel id="AggregationPanel" runat="server"/>
</asp:Content>
============================================================



In the design mode when I click the web part that the columns for the list exists it highlights the part that starts with the tag=      

<WebPartPages:XsltListViewWebPart

so what should I change in this to make for instance   last name ,first name, company columns to appear underneath each other???   I am attaching the screen shots for the list
2.jpg
3.jpg
0
 
GeorgeGerguesCommented:
[Given you are using the sharepoint desinger.]

You might be going for the wrong Webpart here,
I don't think the Listwebpart will allow you to do that, but , what you can do it use a DataViewweb part and get the data from the List

I do recommend that you start from a Custom new Page and insert a new DataViewWebpart and then you can drag the List content from the List you want as a datasource,

Later you can manipulate the field layout of the Data view.

Thanks
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now