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


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

want to get Data key value of details view and use in objectdatasource for data list ?

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :ASP.Net
 

hi,

I have a details view and the primary key is CompanyId which retrieves data from a table called companies.

 

On the same page I have a datalist that is bound to another objectdatasource which has a select method

"GetCompanyByCompanyId".

 

For the parameter for the OBJ seect method attached to data list, I want to use the DataKey Value for the company that is being displayed in

the details view.

 

thanks for any solutions to this

 

M

 

 

 

 




View Complete Post


More Related Resource Links

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



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.

Develop consumer which receiving data from list view

  
In my page I want to display a list view. Each time a user is clicking  on an item the relevant data of the current item will be passed to a consumer web part that I will develop. What interface the list view WP inherit from? Can you give send me an example of such implementation?   Tnx Keren  

XSL Lookup to another List in a View. Joining in data from another List. xsl:value-of select=

  
I've been able to create a DataView with data joined from two SP Lists. I did this using SPD, a linked Source, and doing joined subviews.  The technique works nicely, but I have to create my DataView from scratch.As an alternative, I took an existing AllItems View in SPD, converted it to XSL, and was able to add a column from another List as follows:   <TD Class="{$IDA1VDGH}" style="width: 62px; height: 23px"><xsl:value-of select="/dsQueryResponse/Master/Rows/Row/@Lastname" />The problem is, it reports the column for the first row everytime. I'm new to XSL and was wondering..    using XSL, and preserving all the original columns already in the View, is there anyway to make the added column smarter, maybe with a filter?I noticed in my working example, I have this filter (I guess where the subview join magic is)            [@Title = $dvt_ParentRow/@Key] which does not resolve syntax:I tried this, but it does not work, only finding one match, and it also seems to get set for the entire Dataview and not just the column.     [../../../Master/Rows/Row/@Title = @Key] I guess I'm looking either for the SPD steps, or XSL code for adding a single column from another list, joined in by a column in both lists.Thanks for any help or information.

how to display multiple calendar list data in single calendar view

  
Hi, Normally, we can used to extend the ListViewWebPart's ViewType property to display a particular calendar list items in Calendar View in our custom webpart. Is it any way to display multiple calendar list data in a single calendar view ?? or please provide some pointers related to this issue. Any help is much appreciated.    

Calendar View for External Data List in SharePoint 2010?

  
Hello,

I'd like to create a calendar view from data contained in an External List.  My external content type has a Start Date, End Date, and other calendar fields.  Is this possible using the out of the box BCS?

For extra credit - I'd like to then use this calendar as an overlay on other calendars within my SharePoint 2010 application.

Thanks for your help!

Unable to view data on list views

  
I have two lists. A List item in one list will be inserted to the other list based on the actions. This is easily achieved on the event receiver by adding the list item to the target list. Though I adds the list item to the target list; i am only able to view those data when i click on "Modify View" and simply click on "OK" button. Basically its a view refresh / commit. Has anyone came across such issue?

Data View Web Part, update to Data Source / adding new list to existing data source

  

Hi all,

I have four Lists with identical columns :

List 1
List 2
List 3
List 4

I had to merge them, hence i created a data source ( Linked Source ) and merged these lists in SPD. I have used a data view webpart to display some columns from the merged lists data source and everything was working fine.

But now i have a new List : List 5 which also has the same columns like the other four lists and i need to update the data soure such that it is merged list of 5 lists not 4.

i updated the datasource property of the linked source to merge this new list as well. However the contents of List 5 dont appear in the data view webpart. 

Am i missing something here ? 

I dont want recreate the data view web part from scratch eachtime , because in future there might be List 6 , List 7 as well ... 


How to diplay a data in Details view. Framework 3.5 ASP.Net

  

Hi,

Am having a details view and grid view in a page. In details view I have one dropdown list with selected index changed.I have to take the values from database and bind it to the other fields in details view. I have Written the Query which is executing fine and fetching values(this one i have checked in SQLServer). But when i select any items in DDL, instead of binding it in DetailsView its getting binded to Grid view.... Can some one help me how to fix this issue??


Many Thanks
Riyaz


How to save the Entire Grid view data into sharepoint List using Visual Webparts ?

  

Hai Friends,

        I am Ali, I want to retrive the Entire Grid View data in to Sharepoint List using visual webparts. Present i am using FOR EACH condition for grid view, but it doest support for saving information into list items.

        and also i want to save the information that who has selected radio button in Grid View(Ex: If user select 'Present' or 'Absent' or 'OnDuty' or 'Leave' in these any one) that should be save in sharepoint list.

Please anybody help me,

Thanks

Ali.


How to retrive Data from SharePoint List to Data Grid View in Visual WebParts based on the Condition

  
Hi Friends... 
Here i write this Code for Retrieving Data Form SharePoint List to Data Grid view (st_attendance) in Visual Web parts....  But it doesn't work Properly....


SPWeb web = SPContext.Current.Web;
            SPList list = web.Lists["Student Profile"];
            
                string caml = string.Format(@"<Where><Eq><FieldRef Name='Academic Year' /><Value Type='Text'>{0}</Value></Eq></Where>",DropDownList2.Text );
                SPQuery query = new SPQuery(list.DefaultView);
                query.Query = caml;
                SPListItemCollection items = list.GetItems(query);
                st_attendence.DataSource = items;
                st_attendence.DataBind();
                Controls.Add(st_attendence );

How to retrive Data from SharePoint List to Data Grid View in Visual WebParts based on the Condition

  
Hello Friends,

I am Srinivas, I want to know the How to retrive the Data from SharePoint List to Data Grid View in Visual WebParts based on the Condition.

Example: I want to retrive Students information from Lists to Grid View based on the Condition(based on 'Academic year' or 'Class' and 'Section'). In Student Status Page Grid view should be show the Student Details in their Status.

please any body help me

Thanks

MO(LA)DDU

How to retrive Data from SharePoint List to Data Grid View in Visual WebParts based on the Condition

  

Hello Friends,

     I am Ali, I want to know How to retrive the Data from SharePoint List to Data Grid View in Visual WebParts based on the Condition.

Example: I want to retrive Students information from Lists to Grid View based on the Condition(based on 'Academic year' or 'Class' and 'Section').         In Student Status Page Grid view should be show the Student Details in their Status.

please any body help me

Thanks

Ali.


List view + data pager

  

Hi friends i have just seen this two controls today i really like them but i have some questions

1)is it possible that listview is faster than repeater

2)is it like that datapager will work only with listview not with other controls like grid,repeater,datalist


please give me the answer


Thanks



How to retrieve Data from SharePoint List to Data Grid View in Visual WebParts based on the Conditi

  

Hi Friends..

I am Srinivas Devi

I want to retrieve data from SharePoint List to Data Grid View using Visual Web parts. I want know how to write a LINQ query for retrieve data from Share Point List to Grid View based on two or More Conditions.

Like based on Employee Number, Employee Department etc...

Please Help me Sir..

Thank U Sir..

 


MO(LA)DDU

data view web part unable to show data from list in subsite

  

Hello all,

In 2007, I never had any issues with doing this. In 2010, I created a web part that looks at the Pages list and pulls a few columns and as long as I am within the site, it works fine. But I need to call information from the Pages list in a subsite and display that information on the parent site default page.

In 2007, I made this work by changing ListID to ListName and DefaultValue="Pages" and then change the WebURL to DefaultValue="/SubsiteName/" then place it anywhere and it found it. Now if I change the ListID to ListName and default value to Pages I get an error that the web part cannot be imported. if I try using the actual ListID and change the WebURL to the subsite, I get an error that the web part is looking for a list that does not exist. This worked so easily in 2007.

Any one able to tell me what's going on? Or have a solution?


data view web part unable to show data from list in subsite

  

Hello all,

In 2007, I never had any issues with doing this. In 2010, I created a web part that looks at the Pages list and pulls a few columns and as long as I am within the site, it works fine. But I need to call information from the Pages list in a subsite and display that information on the parent site default page.

In 2007, I made this work by changing ListID to ListName and DefaultValue="Pages" and then change the WebURL to DefaultValue="/SubsiteName/" then place it anywhere and it found it. Now if I change the ListID to ListName and default value to Pages I get an error that the web part cannot be imported. if I try using the actual ListID and change the WebURL to the subsite, I get an error that the web part is looking for a list that does not exist. This worked so easily in 2007.

Any one able to tell me what's going on? Or have a solution?


Categories: 
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