Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all 7589 articles
Browse latest View live

How to search only People using javascript (sp.search.js)?

$
0
0

My code:

$("#searchButton").click(function () {       

var keywordQuery = new Microsoft.SharePoint.Client.Search.Query.KeywordQuery(context);       

keywordQuery.set_queryText($("#searchTextBox").val());       

var searchExecutor = new Microsoft.SharePoint.Client.Search.Query.SearchExecutor(context);

results = searchExecutor.executeQuery(keywordQuery);       

context.executeQueryAsync(onQuerySuccess, onQueryError);   

});       

function onQuerySuccess() {       

$("#resultsDiv").append('<table>');       

$.each(results.m_value.ResultTables[0].ResultRows, function () {     

$("#resultsDiv").append('<tr>');           

$("#resultsDiv").append('<td>' + this.Author + '</td>');           

$("#resultsDiv").append('<td>' + this.Title + '</td>');           

$("#resultsDiv").append('</tr>');       

});       

$("#resultsDiv").append('</table>');   

}


But this code actually find all results. How to filter to show only People results?



Getting document library data using the REST API

$
0
0

I'm having trouble getting both the document URL and list item ID from a document library using the REST API.

I have a custom list and a document library. One of the list fields is a lookup to the document library to allow one more documents to be associated with a list item. I'm working with the REST API using Javascript and jQuery in a visual webpart to provide a front-end for these lists so that documents can be dragged and dropped onto the list items to associate them.

I'm currently expanding the list data to include the ID and title field of associated documents. I can get the document list item ID and Title field using _api/web/lists/getbytitle('doclibname')/items but this doesn't include the document file name or URL, and I can get the file information using _api/web/lists/getbytitle('doclibname')/rootfolder/files but this doesn't included the list item ID.

Is there any way to get the list item ID and file name or URL for a document using the REST API? Ideally I would like to have one call to return all of the data from my list including the ID and URL of all associated documents. Failing that, can anyone suggest an alternative approach?

Thanks!

Anonymous web application : All domain users can log into it with Read access : SharePoint 2013

$
0
0

Hi,

We have an  web application and Where Anonymous access is enabled.

We have around 300+ host header site collections into it. This is multi-tenant farm. Issue is Any domain user can log into any of such site collections though he dont have permission to login into site collection with read permission. Is this something can be controlled within SharePoint 2013 or Any group policy update or any IIS virtual directory permission issue.

We checked permission levels and groups on  SharePoint, no clue we found.

Any ideas on this. Any help would be appreciated.

How to get the Sub Categories name on click of the Main Category in Category Page?

$
0
0

Hi All,

I am new to sharepoint and working on customizing the category page of the Contoso site. Currently the Category landing page displays all the products from the main category and sub category. 

From my research, the products on the category page, is displayed through CSWP with the Navigation term and their child terms.

But I want to customize the category page to display the Subcategories name on click of the Main Category.

From my work i got only one sub-category name (with some additional text added to it) as like the following,

GP0|#8abd65cd-c8b2-41eb-8804-852bdbf78970;L0|#08abd65cd-c8b2-41eb-8804-852bdbf78970|Mobile phones;GTSet|#ada48099-3568-4f57-8764-9d877bafa453;GPP|#39c4ce3f-9b5a-469d-a275-fb667cf46455;GPP|#9e769cc1-e045-4831-a4b5-df12359a0

I included theowstaxidProductCatalogItemCategoryfield in the Control_ListWithPaging.html template to get the above Bolded content.

I want to wrap this problem soon. Please help me. Thanks in advance.

"New instances of this workflow template are currently disallowed" for programmaly start workflow for new SPListItem

$
0
0

Hi, everybody! I need help or advice. I have custom save button for NewForm.aspx and I have exception ""New instances of this workflow template are currently disallowed"", but this button fine work on EditForm.aspx. Why?

protected override bool SaveItem()
        {
            bool result = base.SaveItem();
            if (result)
            {
                try
                {
                    Guid wfid = new Guid("e0e8ee1c-3626-422d-a90b-9e6716e03744");
                    SPWorkflowAssociation ass = base.ListItem.ParentList.WorkflowAssociations.GetAssociationByBaseID(new Guid("e0e8ee1c-3626-422d-a90b-9e6716e03744"));
                    if (ass != null)
                    {
                        base.ListItem.Web.Site.WorkflowManager.StartWorkflow(base.ListItem, ass, ass.AssociationData);
                    }
                }
                catch (Exception ex)
                {
                    SPDiagnosticsService.Local.WriteTrace(0, new SPDiagnosticsCategory(
                        string.Format(StringResource.ExceptionWF, ".SaveApproveButton", ".StartWF"), TraceSeverity.Unexpected, EventSeverity.Error), TraceSeverity.Unexpected, ex.Message, ex.StackTrace);
                }
            }
            return result;
        }
Exception on string 
base.ListItem.Web.Site.WorkflowManager.StartWorkflow(base.ListItem, ass, ass.AssociationData);


Aleksandr Shramko

How to set default value for a field of type 'Sp.FieldMultiChoice' using JavaScriptObject Model

$
0
0

Hi,

How to set default value for a field of type 'Sp.FieldMultiChoice'(dropdown) using JavaScriptObject Model.

Able to set values for that field(dropdown field) as below. 

var clientContext = SP.ClientContext.get_current();

if (clientContext != undefined && clientContext != null) {

var webSite = clientContext.get_web();

taskList = webSite.get_lists().getByTitle("MyList");                

var fieldCollection = taskList.get_fields();

var item = clientContext.castTo(fieldCollection.getByInternalNameOrTitle("Priority"), SP.FieldMultiChoice);

item.set_choices(choices);

item.update();

 

 

Issue with an App Part

$
0
0

Greetings,

Using REST and JavaScript, I have developped an app which can upload a document to SharePoint. This app works fine.

But I needed it as a WebPart Component, so I added this to my project in Visual Studio and I configured it. Finally, I inserted my app as an "App Part" to a page in SharePoint. At first sight, all fields look good but I cannot upload my file. I am getting the error "Forbidden" whereas I have all permissions in the collection of sites.

Thanks in advance for your answer.

Mike

Sharepoint 2013, event receiver to rename files not working

$
0
0

I coded an event receiver (ItemAdding) that renames for example a .txt file to a .text file (it does not matter the extensions, it is just an example). In my code what I do is to an SPFile.MoveTo operation. It works fine in SP2010 but when I execute the same code in SP 2013, when the operation is done using IE I get the text "Sorry, something went wrong" and then "File Not Found".

In the logs this is what I see:

12/23/2013 15:48:49.16  w3wp.exe (0x17B0)                        0x0AC8 SharePoint Foundation         General                        ai1wu Medium   System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002), StackTrace:    at Microsoft.SharePoint.SPWeb.GetFileOrFolderProperties(String strUrl, ListDocsFlags listDocsFlags, Boolean throwException, SPBasePermissions& permMask)     at Microsoft.SharePoint.SPFile.PropertiesCore(Boolean throwException)     at Microsoft.SharePoint.SPFile.get_Length()     at Microsoft.Office.RecordsManagement.PolicyFeatures.ApplicationPages.UploadPage.OnSubmit(Object o, EventArgs e)     at Microsoft.Office.RecordsManagement.PolicyFeatures.ApplicationPages.UploadExPage.OnSubmit(Object o, EventArgs e)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessReque... f72b639c-77b1-5045-c3a2-b23f24ae71c0

It's clear that the Sharepoint upload code tries to do things with the original name and it does not realize that it was renamed.

Can I do something from my event receiver code like using the AfterProperties to bypass this error?

Thanks


Managed Metadata site column can not be viewed in XSLTListViewwebpart

$
0
0

Hi, All:

We have a really annoying bug on our SP13 project, on our home page(provisioned web using site template), there are a couple of xsltListViewWeppart to show some of the lists data. also a custom webpart to display some web level attributes saved in SPweb.AllProperties.

The issue is that, in the xsltListViewWebpart, if we modify the view to include a site column that is a Managed Metadata Site Column, the listview will NOT render and we get an error like following:

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.

Correlation ID:48c0539c-4ed5-501d-e4f3-72cb32fe8ea0

If the MMS site column is removed from the view, the webpart behaves normal.

Any ideas?

Thanks.

-NH




How to insert SharePoint Lists look up columns from other list (SharePoint Apps)?

$
0
0

How do i can insert look up column value to SharePoint list. I created an sharepoint hosted apps and create Two SharePoint list1 and list2. I create new record on list2 and load some data from list1 to a drop down box and try to insert the id and title of value from list1 to list2 (look up value). could please give me some advice or source code example.

Please help.

Thanks you.!


------------------------------------------------------------ ---Tola---

Fault Handler Activity missing in VS 2012 workflow

$
0
0

Hi,

In VS 2012 workflow, the fault handler activity seems to be missing.

How to handle fault in VS 2012 workflow?

Thanks

Create and apply site retention policy on site collection using sharepoint object model

$
0
0

Hi

I want to create and apply site retention policy on site collection using code (server side or client side). I am able to create new policy and it is appearing in site policies link. but i am unable to set closure date and deletion date on it. Which attribute or method i need to set.

I didnt find ant method in SPContentType, Policy, Project Policy or PolicyItem classes.

If anybody has implemented the same, please help.

Regards

Manish Dhingra


SPSiteDataQuery, filter by permission level ?

$
0
0

Is it somehow possible to create a Query that will filter on permission Level ?

I have a list with folders like this:

FolderA   Permissions has been broken    User A has approve Access here.

   ItemA1     Permissions inherited from parent

   ItemA2     Permissions inherited from parent

FolderB    Permissions has been broken User A has contribute Access, but not approve

  ItemB1     Permissions inherited from parent

So how can i get all list items in this list where user A has approve Access ? (ItemA1, ItemA2)

Is it possible ? If not how can i solve this in some way.

The structure needs to be like this..

Visual Studio Workflow Deployment issue

$
0
0

Hi All,

I am creating Visual Studio 2013 workflow. For the first time all goes well, but when I have changed the logic and deployed again, it is still referring the old assembly. I tried to just create a very basic workflow and removed all logic and simple using writetohistory activity still it is working as it was working for the very first time. I deployed several times, but no luck. And when I did the deployment on different server, it start working with new logic, but again when I changed the logic and deployed again.. it shows the same behavior every time. I always take the reference the old assembly.

It is very strange problem for me, I tried several things but no success.

Can anyone please help.

Thanks

Getting data from Oracle database to SharePoint list

$
0
0
I want to extract data from Oracle database to a SharePoint 2013 list, I have the connection url and the username and password;
jdbc:oracle:thin:username/servername@IPaddress:port/DatabaseName
How can it be done?

Question about including JQuery in a Survey list DispForm.aspx page

$
0
0

In SharePoint 2010, I was able to hide the links for editing, deleting... an existing survey entry in the DispForm.aspx page using the following technique:

1 - Save jquery .js file to the Style Library in the top level site

2 - Save the .js file that has the jquery code to hide the link in the Style Library in the top level site

3 - Reference the .js files in the DispForm.aspx page like this:

<asp:content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">
  
 <script type="text/javascript" language="javascript" src='<asp:Literal runat="server" Text="<%$SPUrl:~SiteCollection/Style Library/jquery-1.5.0.min.js%>"'></script>
 <script type="text/javascript" language="javascript" src='<asp:Literal runat="server" Text="<%$SPUrl:~SiteCollection/Style Library/hideedit.js%>"'></script>

</asp:content>

The hideedit.js file contains the following:

$(document).ready(function(){
    
    $('#ctl00_m_g_d3bec7ca_bd25_448d_8874_da35856854c5_ctl00_ctl01_ctl00_toolBarTbl').hide();

});

I am trying to use this same technique in SharePoint 2013 but it is not working.

It appears that neither of the js files are loading properly.

As a test, I put the following in the hideedit.js:

alert('test');

$(document).ready(function(){

    alert('from jquery');
   
});

Neither of the alerts are displayed when navigating to the DispForm.aspx file.

How do I get JQuery loaded in a survey DispForm.aspx file in SharePoint 2013?

Adding Href Property To PublishingWebControls:RichImageField

$
0
0

Hi All,

I have created a page layout inheriting from   artical page content type.I have included page image content field (ie PublishingWebControls:RichImageField when added ) .We need make this field as clickable so that click on this it will open new window with vidoe(Requirment:Need to provide thumb nail url for image  to open vidoe when users click on the image).

Problem:As of now this field is not clickbale.I am trying to add href as custom property to this filed by inheriting class form richimagefield but not getting anyresult.

I tried we can provide anchor tag link for label as <a href='{0}'>{1}</a>", "url", "Click Me"/> its working.

I want the same way for richimage field .Please help me in this .

SharePoint Deginer 2013 ,SP2013 for this task.

Thanks ,

veeresh G


AssignFeaturePackToSiteSubscription Throws Error.

$
0
0

Hello Guys,

I am creating feature pack using server object model. When I am assigning this feature pack to site subsription I m getting error like,.Specified argument was out of the range of valid values.  Here I am updating my code. I am getting error on last line of code thats

 mgr.AssignFeaturePackToSiteSubscription(fs, subscription);

SPSecurity.RunWithElevatedPrivileges(delegate
                {
                using (var site = new SPSite("http://spf2013dev1:3001/sites/TestSite2"))
                {
                    SPSiteSubscription subscription = site.SiteSubscription;
                    SPSiteSubscriptionSettingsManager mgr = SPSiteSubscriptionSettingsManager.Local;
                    SPSiteSubscriptionFeaturePackCollection fSec = mgr.GetAllFeaturePacks();
                    SPSiteSubscriptionFeaturePack fs = mgr.CreateFeaturePack();
                    SPFeatureDefinitionCollection fDefs = SPFarm.Local.FeatureDefinitions;
                    SPFeatureDefinition fd = null;
                    fd = fDefs[new Guid("09ce0902-ef5c-45da-b727-a76e7f551607")];
                    fs.Add(fd);
                    mgr.AssignFeaturePackToSiteSubscription(fs, subscription);
                }
            }
            );

If you have any clue where exactly I am wrong, please let me know your comments.

Thanks in Advance.

Assign Feature Pack to Site Subscription Using Server Object Model

$
0
0

Hello Experts,

I have created a site subscription using server object model with Sharepoint 2013 foundation. I did same thing with Share Point management shell. But now I wanted to do it with Sharepoint server object model.

So Now I am stuck with a question. How can I create and assign feature pack to the Site subscription from the server object model(Not from share point management shell-Power Shell). I have followed this link to create site subscription with sharepoint server object model.

Is it possible to create feature pack and assign to Site Subscription with server object model.

Please let me know your comments.

Thanks in Advance. :)


How to add connection between two Web Part Data Views in sharepoint designer 2013

$
0
0

Hi I have problems with connect two data view

I have a SQL server database named Mini

In Mini database I have two tables:  dbo.Table_A and dbo.Table_B

Table_A design and Table_B design


In the internet browser it look like this after I add the connections, the problem is there is no connection when I click at the Blue link id 2 and 3 ??? John's and Jes's Lastname did not show up, the links is dead. that's my problem

The must strange is that, if I do the same below, in sharepoint 2010 designer it do well ?? so what in the .....

Here is my code

 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><%@ Page Language="C#" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register tagprefix="SharePoint" namespace="Microsoft.SharePoint.WebControls" assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register tagprefix="WebPartPages" namespace="Microsoft.SharePoint.WebPartPages" assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><meta name="ProgId" content="SharePoint.WebPartPage.Document" /><meta name="WebPartPageExpansion" content="full" /><meta http-equiv="X-UA-Compatible" content="IE=10" /><SharePoint:CssRegistration Name="default" runat="server"/></head><body><form id="form1" runat="server"><table width="10%"><tr><td><WebPartPages:SPWebPartManager runat="server" id="SPWebPartManager"><SPWebPartConnections><WebPartPages:spwebpartconnection ID="g_1660BB6ADC7243088A1BB7F5C196203A" ConsumerConnectionPointID="DFWP Filter Consumer ID" ConsumerID="g_2abfc8f5_0eb3_4711_a5b0_7e7518f56881" ProviderConnectionPointID="DFWP Row Provider ID" ProviderID="g_b70a05bb_a849_423d_8e53_c7ad9ccc18ad"><WebPartPages:sprowtoparameterstransformer ProviderFieldNames="@ID" ConsumerFieldNames="@ID" /></WebPartPages:spwebpartconnection></SPWebPartConnections></WebPartPages:SPWebPartManager><asp:ScriptManager runat="server" id="ScriptManager"></asp:ScriptManager><WebPartPages:DataFormWebPart runat="server" IsIncluded="True" AsyncRefresh="True" FrameType="None" NoDefaultStyle="TRUE" ViewFlag="8" Title="Table_A on Mini" PageType="PAGE_NORMALVIEW" __markuptype="vsattributemarkup" __WebPartId="{B70A05BB-A849-423D-8E53-C7AD9CCC18AD}" id="g_b70a05bb_a849_423d_8e53_c7ad9ccc18ad" pagesize="10"><DataSources><asp:SqlDataSource id="Table_A_x0020_on_x0020_Mini2" runat="server" __designer:commandsync="true" ProviderName="System.Data.SqlClient" ConnectionString="Data Source=TestMSSQL;User ID=SQLADMIN;Password=079130;Initial Catalog=Mini;" SelectCommand="SELECT * FROM [Table_A] ORDER BY [ID] ASC "/></DataSources><ParameterBindings><ParameterBinding Name="dvt_apos" Location="Postback;Connection"/><ParameterBinding Name="ManualRefresh" Location="WPProperty[ManualRefresh]"/><ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/><ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/><ParameterBinding Name="dvt_firstrow" Location="Postback;Connection"/><ParameterBinding Name="dvt_nextpagedata" Location="Postback;Connection"/><ParameterBinding Name="dvt_curselkey" Location="Postback;Connection" DefaultValue="##init##"/></ParameterBindings><datafields>@ID,ID;@ForeName,ForeName;</datafields><XSL><xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal"><xsl:output method="html" indent="no"/><xsl:decimal-format NaN=""/><xsl:param name="dvt_curselkey">##init##</xsl:param><xsl:param name="dvt_apos">'</xsl:param><xsl:param name="ManualRefresh"></xsl:param><xsl:param name="dvt_firstrow">1</xsl:param><xsl:param name="dvt_nextpagedata" /><xsl:variable name="dvt_1_automode">0</xsl:variable><xsl:template match="/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls"><xsl:choose><xsl:when test="($ManualRefresh = 'True')"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><xsl:call-template name="dvt_1"/></td><td width="1%" class="ms-vb" valign="top"><img src="/_layouts/15/images/staticrefresh.gif" id="ManualRefresh" border="0" onclick="javascript: {ddwrt:GenFireServerEvent('__cancel')}" alt="Click here to refresh the dataview."/></td></tr></table></xsl:when><xsl:otherwise><xsl:call-template name="dvt_1"/></xsl:otherwise></xsl:choose></xsl:template><xsl:template name="dvt_1"><xsl:variable name="dvt_StyleName">Table</xsl:variable><xsl:variable name="Rows" select="/dsQueryResponse/NewDataSet/Row"/><xsl:variable name="dvt_RowCount" select="count($Rows)"/><xsl:variable name="RowLimit" select="10" /><xsl:variable name="FirstRow" select="$dvt_firstrow" /><xsl:variable name="LastRow"><xsl:choose><xsl:when test="($FirstRow + $RowLimit - 1) &gt; $dvt_RowCount"><xsl:value-of select="$dvt_RowCount" /></xsl:when><xsl:otherwise><xsl:value-of select="$FirstRow + $RowLimit - 1" /></xsl:otherwise></xsl:choose></xsl:variable><xsl:variable name="IsEmpty" select="$dvt_RowCount = 0" /><xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0"/><xsl:choose><xsl:when test="$dvt_IsEmpty"><xsl:call-template name="dvt_1.empty"/></xsl:when><xsl:otherwise><table border="0" width="100%" cellpadding="2" cellspacing="0"><tr valign="top"><xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1"><th class="ms-vh" width="1%" nowrap="nowrap"></th></xsl:if><th class="ms-vh" nowrap="nowrap">ID</th><th class="ms-vh" nowrap="nowrap">ForeName</th></tr><xsl:call-template name="dvt_1.body"><xsl:with-param name="Rows" select="$Rows[position() &gt;= $FirstRow and position() &lt;= $LastRow]"/><xsl:with-param name="FirstRow" select="1" /><xsl:with-param name="LastRow" select="$dvt_RowCount" /></xsl:call-template></table></xsl:otherwise></xsl:choose><xsl:call-template name="dvt_1.commandfooter"><xsl:with-param name="FirstRow" select="$FirstRow" /><xsl:with-param name="LastRow" select="$LastRow" /><xsl:with-param name="RowLimit" select="$RowLimit" /><xsl:with-param name="dvt_RowCount" select="$dvt_RowCount" /><xsl:with-param name="RealLastRow" select="number(ddwrt:NameChanged('',-100))" /></xsl:call-template></xsl:template><xsl:template name="dvt_1.body"><xsl:param name="Rows"/><xsl:param name="FirstRow" /><xsl:param name="LastRow" /><xsl:for-each select="$Rows"><xsl:variable name="CurrentRowKey"><xsl:call-template name="dvt.gencurselkey"><xsl:with-param name="RowPath" select="." /></xsl:call-template></xsl:variable><xsl:variable name="dvt_KeepItemsTogether" select="false()" /><xsl:variable name="dvt_HideGroupDetail" select="false()" /><xsl:if test="(position() &gt;= $FirstRow and position() &lt;= $LastRow) or $dvt_KeepItemsTogether"><xsl:if test="not($dvt_HideGroupDetail)" ddwrt:cf_ignore="1"><xsl:call-template name="dvt_1.rowview" ><xsl:with-param name="CurrentRowKey" select="$CurrentRowKey" /></xsl:call-template></xsl:if></xsl:if></xsl:for-each></xsl:template><xsl:template name="dvt_1.rowview"><xsl:param name="CurrentRowKey" /><tr><xsl:if test="position() mod 2 = 1"><xsl:attribute name="class">ms-alternating</xsl:attribute></xsl:if><xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1"><td class="ms-vb" width="1%" nowrap="nowrap"><span ddwrt:amkeyfield="" ddwrt:amkeyvalue="ddwrt:EscapeDelims(string(''))" ddwrt:ammode="view"></span></td></xsl:if><td class="ms-vb"><a target="_self"><xsl:attribute xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="href"><xsl:variable name="cursel">dvt_curselkey={<xsl:call-template name="dvt.gencurselkey"><xsl:with-param name="RowPath" select="." /></xsl:call-template>
						}</xsl:variable><xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="fields">@ID=<xsl:value-of select="ddwrt:ConnEncode(string(@ID))" /></xsl:variable><xsl:text>javascript:</xsl:text><xsl:value-of select="ddwrt:GenFireConnection(concat('g_2abfc8f5_0eb3_4711_a5b0_7e7518f56881*',$fields),string($cursel))"></xsl:value-of></xsl:attribute><xsl:attribute name="style"><xsl:if test="$CurrentRowKey = $dvt_curselkey">font-weight: bold;</xsl:if></xsl:attribute><xsl:value-of select="format-number(@ID, '#,##0.#;-#,##0.#')" /></a></td><td class="ms-vb"><xsl:value-of select="@ForeName" /></td></tr></xsl:template><xsl:template name="dvt_1.empty"><xsl:variable name="dvt_ViewEmptyText">There are no items to show in this view.</xsl:variable><table border="0" width="100%"><tr><td class="ms-vb"><xsl:value-of select="$dvt_ViewEmptyText"/></td></tr></table></xsl:template><xsl:template name="dvt_1.commandfooter"><xsl:param name="FirstRow" /><xsl:param name="LastRow" /><xsl:param name="RowLimit" /><xsl:param name="dvt_RowCount" /><xsl:param name="RealLastRow" /><table cellspacing="0" cellpadding="4" border="0" width="100%"><tr><xsl:if test="$FirstRow &gt; 1 or $LastRow &lt; $dvt_RowCount"><xsl:call-template name="dvt_1.navigation"><xsl:with-param name="FirstRow" select="$FirstRow" /><xsl:with-param name="LastRow" select="$LastRow" /><xsl:with-param name="RowLimit" select="$RowLimit" /><xsl:with-param name="dvt_RowCount" select="$dvt_RowCount" /><xsl:with-param name="RealLastRow" select="$RealLastRow" /></xsl:call-template></xsl:if></tr></table></xsl:template><xsl:template name="dvt_1.navigation"><xsl:param name="FirstRow" /><xsl:param name="LastRow" /><xsl:param name="RowLimit" /><xsl:param name="dvt_RowCount" /><xsl:param name="RealLastRow" /><xsl:variable name="PrevRow"><xsl:choose><xsl:when test="$FirstRow - $RowLimit &lt; 1">1</xsl:when><xsl:otherwise><xsl:value-of select="$FirstRow - $RowLimit" /></xsl:otherwise></xsl:choose></xsl:variable><xsl:variable name="LastRowValue"><xsl:choose><xsl:when test="$LastRow &gt; $RealLastRow"><xsl:value-of select="$LastRow"></xsl:value-of></xsl:when><xsl:otherwise><xsl:value-of select="$RealLastRow"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:variable><xsl:variable name="NextRow"><xsl:value-of select="$LastRowValue + 1"></xsl:value-of></xsl:variable><td nowrap="nowrap" class="ms-paging" align="right"><xsl:if test="$dvt_firstrow &gt; 1" ddwrt:cf_ignore="1"><a><xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent('dvt_firstrow={1}')" />;</xsl:attribute>
				Start</a><xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text><a><xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$PrevRow,'}'))" />;</xsl:attribute><img src="/_layouts/15/images/prev.gif" border="0" alt="Previous" /></a><xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text></xsl:if><xsl:value-of select="$FirstRow" />
			 - <xsl:value-of select="$LastRowValue" /><xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text><xsl:if test="$LastRowValue &lt; $dvt_RowCount or string-length($dvt_nextpagedata)!=0" ddwrt:cf_ignore="1"><a><xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$NextRow,'}'))" />;</xsl:attribute><img src="/_layouts/15/images/next.gif" border="0" alt="Next" /></a></xsl:if></td></xsl:template><xsl:template name="dvt.gencurselkey"><xsl:param name="RowPath" /><xsl:choose><xsl:when test="$dvt_curselkey = '##init##' and position() = $dvt_firstrow">##init##</xsl:when><xsl:otherwise><xsl:value-of select="ddwrt:ConnEncode(string($RowPath/@ID))" /></xsl:otherwise></xsl:choose></xsl:template></xsl:stylesheet>	</XSL></WebPartPages:DataFormWebPart></td></tr><tr><td><WebPartPages:DataFormWebPart runat="server" IsIncluded="True" AsyncRefresh="True" FrameType="None" NoDefaultStyle="TRUE" ViewFlag="8" Title="Table_B on Mini" PageType="PAGE_NORMALVIEW" __markuptype="vsattributemarkup" __WebPartId="{2ABFC8F5-0EB3-4711-A5B0-7E7518F56881}" id="g_2abfc8f5_0eb3_4711_a5b0_7e7518f56881" pagesize="10"><DataSources><asp:SqlDataSource id="Table_B_x0020_on_x0020_Mini1" runat="server" __designer:commandsync="true" ProviderName="System.Data.SqlClient" ConnectionString="Data Source=TestMSSQL;User ID=SQLADMIN;Password=079130;Initial Catalog=Mini;" SelectCommand="SELECT * FROM [Table_B] ORDER BY [ID] ASC "/></DataSources><ParameterBindings><ParameterBinding Name="dvt_apos" Location="Postback;Connection"/><ParameterBinding Name="ManualRefresh" Location="WPProperty[ManualRefresh]"/><ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/><ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/><ParameterBinding Name="dvt_firstrow" Location="Postback;Connection"/><ParameterBinding Name="dvt_nextpagedata" Location="Postback;Connection"/></ParameterBindings><datafields>@ID,ID;@LastName,LastName;</datafields><XSL><xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal"><xsl:output method="html" indent="no"/><xsl:decimal-format NaN=""/><xsl:param name="dvt_apos">'</xsl:param><xsl:param name="ManualRefresh"></xsl:param><xsl:param name="dvt_firstrow">1</xsl:param><xsl:param name="dvt_nextpagedata" /><xsl:variable name="dvt_1_automode">0</xsl:variable><xsl:template match="/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls"><xsl:choose><xsl:when test="($ManualRefresh = 'True')"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><xsl:call-template name="dvt_1"/></td><td width="1%" class="ms-vb" valign="top"><img src="/_layouts/15/images/staticrefresh.gif" id="ManualRefresh" border="0" onclick="javascript: {ddwrt:GenFireServerEvent('__cancel')}" alt="Click here to refresh the dataview."/></td></tr></table></xsl:when><xsl:otherwise><xsl:call-template name="dvt_1"/></xsl:otherwise></xsl:choose></xsl:template><xsl:template name="dvt_1"><xsl:variable name="dvt_StyleName">Table</xsl:variable><xsl:variable name="Rows" select="/dsQueryResponse/NewDataSet/Row"/><xsl:variable name="dvt_RowCount" select="count($Rows)"/><xsl:variable name="RowLimit" select="10" /><xsl:variable name="FirstRow" select="$dvt_firstrow" /><xsl:variable name="LastRow"><xsl:choose><xsl:when test="($FirstRow + $RowLimit - 1) &gt; $dvt_RowCount"><xsl:value-of select="$dvt_RowCount" /></xsl:when><xsl:otherwise><xsl:value-of select="$FirstRow + $RowLimit - 1" /></xsl:otherwise></xsl:choose></xsl:variable><xsl:variable name="IsEmpty" select="$dvt_RowCount = 0" /><xsl:variable name="dvt_IsEmpty" select="$dvt_RowCount = 0"/><xsl:choose><xsl:when test="$dvt_IsEmpty"><xsl:call-template name="dvt_1.empty"/></xsl:when><xsl:otherwise><table border="0" width="100%" cellpadding="2" cellspacing="0"><tr valign="top"><xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1"><th class="ms-vh" width="1%" nowrap="nowrap"></th></xsl:if><th class="ms-vh" nowrap="nowrap">ID</th><th class="ms-vh" nowrap="nowrap">LastName</th></tr><xsl:call-template name="dvt_1.body"><xsl:with-param name="Rows" select="$Rows[position() &gt;= $FirstRow and position() &lt;= $LastRow]"/><xsl:with-param name="FirstRow" select="1" /><xsl:with-param name="LastRow" select="$dvt_RowCount" /></xsl:call-template></table></xsl:otherwise></xsl:choose><xsl:call-template name="dvt_1.commandfooter"><xsl:with-param name="FirstRow" select="$FirstRow" /><xsl:with-param name="LastRow" select="$LastRow" /><xsl:with-param name="RowLimit" select="$RowLimit" /><xsl:with-param name="dvt_RowCount" select="$dvt_RowCount" /><xsl:with-param name="RealLastRow" select="number(ddwrt:NameChanged('',-100))" /></xsl:call-template></xsl:template><xsl:template name="dvt_1.body"><xsl:param name="Rows"/><xsl:param name="FirstRow" /><xsl:param name="LastRow" /><xsl:for-each select="$Rows"><xsl:variable name="dvt_KeepItemsTogether" select="false()" /><xsl:variable name="dvt_HideGroupDetail" select="false()" /><xsl:if test="(position() &gt;= $FirstRow and position() &lt;= $LastRow) or $dvt_KeepItemsTogether"><xsl:if test="not($dvt_HideGroupDetail)" ddwrt:cf_ignore="1"><xsl:call-template name="dvt_1.rowview" /></xsl:if></xsl:if></xsl:for-each></xsl:template><xsl:template name="dvt_1.rowview"><tr><xsl:if test="position() mod 2 = 1"><xsl:attribute name="class">ms-alternating</xsl:attribute></xsl:if><xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1"><td class="ms-vb" width="1%" nowrap="nowrap"><span ddwrt:amkeyfield="" ddwrt:amkeyvalue="ddwrt:EscapeDelims(string(''))" ddwrt:ammode="view"></span></td></xsl:if><td class="ms-vb"><xsl:value-of select="format-number(@ID, '#,##0.#;-#,##0.#')"/></td><td class="ms-vb"><xsl:value-of select="@LastName" /></td></tr></xsl:template><xsl:template name="dvt_1.empty"><xsl:variable name="dvt_ViewEmptyText">There are no items to show in this view.</xsl:variable><table border="0" width="100%"><tr><td class="ms-vb"><xsl:value-of select="$dvt_ViewEmptyText"/></td></tr></table></xsl:template><xsl:template name="dvt_1.commandfooter"><xsl:param name="FirstRow" /><xsl:param name="LastRow" /><xsl:param name="RowLimit" /><xsl:param name="dvt_RowCount" /><xsl:param name="RealLastRow" /><table cellspacing="0" cellpadding="4" border="0" width="100%"><tr><xsl:if test="$FirstRow &gt; 1 or $LastRow &lt; $dvt_RowCount"><xsl:call-template name="dvt_1.navigation"><xsl:with-param name="FirstRow" select="$FirstRow" /><xsl:with-param name="LastRow" select="$LastRow" /><xsl:with-param name="RowLimit" select="$RowLimit" /><xsl:with-param name="dvt_RowCount" select="$dvt_RowCount" /><xsl:with-param name="RealLastRow" select="$RealLastRow" /></xsl:call-template></xsl:if></tr></table></xsl:template><xsl:template name="dvt_1.navigation"><xsl:param name="FirstRow" /><xsl:param name="LastRow" /><xsl:param name="RowLimit" /><xsl:param name="dvt_RowCount" /><xsl:param name="RealLastRow" /><xsl:variable name="PrevRow"><xsl:choose><xsl:when test="$FirstRow - $RowLimit &lt; 1">1</xsl:when><xsl:otherwise><xsl:value-of select="$FirstRow - $RowLimit" /></xsl:otherwise></xsl:choose></xsl:variable><xsl:variable name="LastRowValue"><xsl:choose><xsl:when test="$LastRow &gt; $RealLastRow"><xsl:value-of select="$LastRow"></xsl:value-of></xsl:when><xsl:otherwise><xsl:value-of select="$RealLastRow"></xsl:value-of></xsl:otherwise></xsl:choose></xsl:variable><xsl:variable name="NextRow"><xsl:value-of select="$LastRowValue + 1"></xsl:value-of></xsl:variable><td nowrap="nowrap" class="ms-paging" align="right"><xsl:if test="$dvt_firstrow &gt; 1" ddwrt:cf_ignore="1"><a><xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent('dvt_firstrow={1}')" />;</xsl:attribute>
				Start</a><xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text><a><xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$PrevRow,'}'))" />;</xsl:attribute><img src="/_layouts/15/images/prev.gif" border="0" alt="Previous" /></a><xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text></xsl:if><xsl:value-of select="$FirstRow" />
			 - <xsl:value-of select="$LastRowValue" /><xsl:text disable-output-escaping="yes" ddwrt:nbsp-preserve="yes">&amp;nbsp;</xsl:text><xsl:if test="$LastRowValue &lt; $dvt_RowCount or string-length($dvt_nextpagedata)!=0" ddwrt:cf_ignore="1"><a><xsl:attribute name="href">javascript: <xsl:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$NextRow,'}'))" />;</xsl:attribute><img src="/_layouts/15/images/next.gif" border="0" alt="Next" /></a></xsl:if></td></xsl:template></xsl:stylesheet>	</XSL></WebPartPages:DataFormWebPart></td></tr></table></form></body></html>

   



Viewing all 7589 articles
Browse latest View live