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

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

Data view webpart ParentPath variable

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :SharePoint



Whenever we insert a data View webpart in webpart zone, it introduces following lines of code on the .aspx page for XSLT, What does ParentPath variable corresponds to?


<xsl:template name="dvt_1">
  <xsl:param name="ParentPath"/>
  <xsl:variable name="dvt_StyleName">Table</xsl:variable>
  <xsl:variable name="Rows" select="/dsQueryResponse/Projects/Rows/Row"/>

View Complete Post

More Related Resource Links

Webpart Zone and Data View WebPart


Hi All,

I was trying to add multiple data view webparts in a single webpart zone and I couldn't.

Can someone please suggest a hint or a solution? Thanks...






How to display the latest list items in the data view webpart

Hi Guys,

I am pretty new to the SharePoint designer. So don't know much of its capabilities.

I am creating a dataview webpart which display the data from the sharepoint list. In this webpart, i have to display data only for last created date means if we have data in list for 12th, 13th, 14th and 15th march data view display data for date 15th march.
I tried using the simple filter with current date but that not worked. Any idea how we can achieve this.

Thanks in advance,
Thanks, Cool Developer

How to retrieve data from SqlDataSource and pass to a variable?


Hi there,

I have a page in my website where there is very little code-behind. I only have two lines of code in Page_Load() and the rest of the code is declarative ASP.NET code. I have a FormView control which uses a SqlDataSource to get some order information. The SqlDataSource calls a stored procedure called usp_GetOrderDetails, here's the code for the SqlDataSource:

    <asp:SqlDataSource ID="sdsFormOrderDetails" runat="server" 
ConnectionString="<%$ ConnectionStrings:ForexDB %>"
ProviderName="<%$ ConnectionStrings:ForexDB.ProviderName %>"
SelectCommand="usp_GetOrderDetails" SelectCommandType="StoredProcedure"
UpdateCommand="usp_UpdateOrder" UpdateCommandType="StoredProcedure"
<asp:ControlParameter Name="orderId" ControlID="grdOrders" PropertyName="SelectedDataKey.Value" />
<asp:ControlParameter Name="orderId" ControlID="frmOrderDetails" PropertyName="SelectedValue" />

Vista and Office: View Data Your Way With Our Managed Preview Handler Framework


Stephen Toub shows you how to write your own Preview handlers for Windows Vista and Outlook 2007.

Stephen Toub

MSDN Magazine January 2007

Disable filtering on a Dynamic Data list view.


I have an entity set of NotificationTemplates, and each one of these has a collection of zero-many SmsTemplate entities. When editing or viewing a NotificationTemplate, I have a link to View SMS Templates. That link takes me to a List view for the SmsTemplates entity set, filtered for the NotificationTemplate I was viewing.

How can I prevent the user changing this filter to show SmsTemplates for another NotificationTemplate? That is, I want the filter, but it must be read only. The drop-down just mustn't drop down, it must just display the name of the NotificationTemplate that these SmsTemplates belong to. To view SmsTemplates for another NotificationTemplate, the user must click View SMS Templates from that other template.

This was originally asked by myself on SatckOverflow at: http://stackoverflow.com/questions/3514373/disable-filtering-on-a-dynamic-data-list-view

show data in grid view error Arithmetic operation resulted in an overflow.



i have a table there is 17 columns in 17 column 3 are number and other are varchar . when i try to display all data of that column error occures.

one more intersting think is when i try to display 6 column then grid show there data an no more error occures. 

when i run my project this error occures in grid view

Arithmetic operation resulted in an overflow. 

Entity Data Model and database view returning the same columns as there are in a table


When adding a stored procedure into the Entity Data Model I can select whether the procedure returns a scalar, a (new) complex type or one of the entity types I already defined. 

How do I do something similar for a view?

I mean assuming I have a view like this

CREATE VIEW FilteredFoos as SELECT Foo.* FROM Foo join ... WHERE ...

(that is a view that implements some involved filtering, but returns all columns from one table) how do I add it to the project so that I can use the entity set, but get the Foo objects, not some new FilteredFoo objects.

var foos = myDB.FilteredFoos.Include("Bar").ToList();

foreach (Foo foo in foos) { ...

Thanks, Jenda

How to create scrolling table for columns in a SharePoint Designer Data View


I have a fairly complex SharePoint Designer 2007 Data View they have added two more requirements.

1. Have the columns on the right side be able to scroll left to right as there is a large number of columns, while the first 3 columns on the left side stay locked in place.  This is only one list not two, and because of some other requirements I have it must remain to be just one list.

2. Then they also need to have scrolling up and down of the entire list with the headers locked in place.

The first requirement is more important than the second, but preferrably I need to do both.

I am new to XSL so not familar with the syntax. Is this something I can do on a custom Data View? Does anyone have any examples of how?

I have a drawing that show how it needs to look but I don't see an option here to upload a graphic.

So here is a link to my graphic example uploaded to my blog area: http://lindachapman.blogspot.com/  or just the image here: http://4.bp.blogspot.com/_aB01ue__NvQ/TGL42MOvrGI/AAAAAAAAAA4/c3xP4uCy4BU/s1600/Scrolling.png

I failed to mention that 3/4 of the columns are HTML Calculated fields wh

Add page numbers for paging in data view web part


Hello all,

Has anyone found a solution that will allow me to have page numbers for paging in a data view web part. For instance, if I have 40 items/rows and I set the paging to display 10 items, I'd like the paging to show 1 2 3 4 rather than showing 1-10 and having to click next over and over to get to a specific item.

I found this article, but it is for 2003 and doesn't seem to apply to 2007 or if it does I am not able to really figure out how.


Please help!

Thanks in advance.


MVC view displays Preveously loaded data only



1. May be it loading page either from History or Chache memory.

2. When anonymous user open about-us page or Home page then we display only 4 menus. And immediatly Normal user logs in and

open about-us page or Home page it again display only 4 menus instead displaying all menus available for registered user. I

have used the PartialView and render it in Master page(use the code Html.RenderPartial("Menus")) see the following code...

<%@ Control Language="VB" Inherits="System.Web.Mvc.ViewUserControl" %>
<%: ""%>
<div id="menucontainer">
    <ul id="menu">       
            <%  If Request.IsAuthenticated = False Then%>
                <li><%= Html.ActionLink("Home", "Index", "Home")%></li>
                <li><%= Html.ActionLink("Register", "Register", "Account")%></li>

DataContractSerialization - View the serialized data

I am trying DataContractSerialization for the first time and I would like to see the results of my serialization. Some fields seem to be missing, and it is difficult trying to debug it without being able to see what is being serialized. I have tried both the CreateBinaryWriter and tried the CreateTextWriter with the hope I could view what it serialized: Dim str As New MemoryStream() Dim dcs As New DataContractSerializer(GetType(CustomerAccount)) 'Using w As XmlDictionaryWriter = XmlDictionaryWriter.CreateBinaryWriter(str) ' dcs.WriteObject(w, Me) 'End Using Using w As XmlDictionaryWriter = XmlDictionaryWriter.CreateTextWriter(str) dcs.WriteObject(w, Me) Debug.WriteLine(w.ToString()) End Using In either case, I cannot find a way to view the results with actually deserializing back to an object. (I have used the XMLSerializer in the past and it was always easy to see the result of the serialization without actually deserializing.) Any tips would be appreciated.    www.insteptech.com ; msmvps.com/blogs/deborahk We are volunteers and ask only that if we are able to help you, that you mark our reply as your answer. THANKS!

Data Mining - Business User's view

Using BIDS, when I create a Mining model solution I can see lot's of useful utilities like Mining Model viewer, Mining Model Prediction etc that comes with lot's of graphs' etc. What would be the best approach to display these graph's to business users. Can I do this efficiently using SSRS or Do I need to use PowerPivot etc..

Rendering Partial view postback with data posted back and entire view context

This is the base Index.aspx view:<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> <%@ Import Namespace="LMWebUI.Components" %> <%@ Import Namespace="LMWebUI.Models" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <% Session["HasScripts"] = "false"; %> <% if (Utility.FixNull(Session["LoggedIn"],"false") == "false" ) {%> <% ViewData["Login"] = new PartialRequest ( new { controller = "Account", action = "LogIn" } ); ((PartialRequest)ViewData["Login"]).Invoke(ViewContext); %> <%} else {%> <div>Logged In Content here</div> <%}%> <script type="text/javascript"> LMx.init(); </script> </asp:Content> This is a helper class> that I found elsewhere, doesn't solve the problem, but still works to display the viewpublic class PartialRequest { public RouteValueDictionary RouteValues { get; private set; } public PartialRequest(object routeValues

Calculated date field displays differently in List View and Data View web parts

In SharePoint GUI I created a simple custom list with a calculated Date/Time field (Due).  The calculation is =[Created]+7.  I'm trying to display this data on a page using a DVWP.  But first, for testing purposes, I also created a second calculated Date/Time (TestCreate) field in my custom list that is simply =[Created]. In the List View from within SharePoint, the dates show as expected (for example): Created = 8/12/2010 3:45 PM Due = 8/19/2010 3:45 PM TestCreate = 8/12/2010 3:45 PM In SharePoint Designer, I added a Data View web part and the above three data elements (each configured to display mm/dd/yyyy hh:mm:ss tt).  I see the time displayed for the example list item as: Created = 8/12/2010 3:45:30 PM Due = 8/19/2010 10:45:00 AM TestCreate = 8/12/2010 10:45:00 AM I've tested a couple scenarios and the calculated fields always display five hours in the past (along with dropping the seconds).  It seems like the DVWP is returning the date in a different time zone (with no seconds).  The lcid is set right (1033).  I didn't see any time zone settings for the DVWP specifically.  I'm basically stuck.  Could someone help me figure this one out. Thanks.

Handle anchor tag when there is no data in data view

HI, I have a DataView Web part on my page.Announcements Data is binded to Data view and below the Dataview web part i have a anchor tag(See all Announcements link) which redirects to all announcemnts to a different page. Anchor tag is not a part of Data view....It's a seperate tag on the page My requirement is i don't want to show the All Announcements Link when there is no data. Is it better to have a CEWP to place my text 'See All Announcements' to handle this scenario? Thanks in advance. Ravi      

list webpart, not using the sourse url, but referring back to the library view on close.

i have a webpart which brings a list in to my front page. -when user clicks, it shows  the item, and when he clicks on close,it takes him back to the library view. not back to the page,from where the request has initiated. we are using f5 load balancer, and our webapplications are extended. is there somesetup i am missing, so that i can make the sourse url's refer back to the originating page.        

Data Source View Gives incorrect Error--Different Data Type

Hi, I'm creating a report model (2008 R2).  I am trying to create a relationship between two tables.  One FKs to another--same name and type (tinyint) columns.  But the Data Source View editor doesn't allow this, giving the message "...source and destination column have different data types".  But the columns are the same types.  I ahd this once before  acouple of years ago and don't remember how I got around it. Does anyong have ideas?  
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