.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

List Form pages

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :SharePoint
Hi i need to create a List "My Announcements " where the columns are 1. Title 2.Body 3.Expiry date 4.Target Groups i should retrieve Target Groups from Sql server Database Table.   And on User selection, an Announcement Item should be added.   Can i achieve this by modifying Share point List Form using share point designer or do i need to create custom page for users to add an announcement Item?   Regards, Vinay

View Complete Post

More Related Resource Links

sharepoint list form pages



i need to create custom form pages for sharepoint list with content type. The following code i wrote in FeatureReceiver class.

  Guid listId = web.Lists.Add("MyAnnouncements", "MyAnnouncements", SPListTemplateType.Announcements);
                        SPList lstAnnouncements = web.Lists[listId];

                        lstAnnouncements.ContentTypesEnabled = true;



                        foreach (SPContentType contentType in web.ContentTypes)

Filter web parts in new form page of a list



I've created 2 custom lists. The 2nd list has a lookup column from the 1st list. In the new form page for this 2nd list, I've added the 1st list as a web part. Now, I want to connect the 2 web parts, but it's not available. Basically, what I wanted is that when I select an item on the lookup column, the webpart containing 1st list would show that item on the same page.

I think I'll need to use Sharepoint Designer to implement something like this, but just wanted to check if anyone has done something like this using browser only.



(MVC & jQuery) Can't Add Datepicker to List of form elements



I'm still relatively new to jQuery (mostly finding things I need online and making simple changes). I have the following piece of code in my MVC app to render a partial view

<% int i = 0;
   foreach (var item in Model) { %>

        <td valign="top" style="border: none;">
            <%= Html.TextBox("MeetingList[" + i + "].Start", String.Format("{0:MM/dd/yyyy HH:mm}", item.Start), new { @style = "width: 120px;", @class="start" })%>
        <td valign="top" style="border: none;">
            <%= Html.TextBox("MeetingList[" + i + "].End", String.Format("{0:MM/dd/yyyy HH:mm}", item.End), new { @style = "width: 120px;", @class = "end" })%>

And I've tried the following to grab each of those 'MeetingList[...' items and add a datepicker to them,

        $(".start").each(function(index) {
            var $temp = $('#MeetingList[' + index + '].Start');
}); });


c# form problem with list item


I've got a c# form containing a listbox how ever i cant get

listbox1.items.Selected      to work



neither work. both not giving me the option for .selected nor selectedvalue

how does this work on c# forms as it works the above way on webforms....

Submit a aspx form to a sharepoint list?

Hi,I have a wizard control form in visual studio 2008.. I need to submit this form to a sharepoint list? Is this possible?thanks!

How to read a column of a sharepoint list to a text string field of infopath form?

My infopath form used to read these email addresses from a web service and web.config file. Now i would like to get these user email addresses from a contact list in a sharepoint server. I am trying to do this without writing any codes. Here is what i have done so far: 1. Adding a new "data connection to receive data from SharePoint library or List" where i selected Email Address column of the contact list. 2. I added a new Text Field and define a new rule with "Query using a data connection" defined above. When i try to access the newly created Text field above it always return empty as if the Query attached to it did not executed at all. What did i do wrong? Is there a better way? Thank you in advance for your help.

How to generate List Menu form the DataTable

Hi all,This is my c# code.public partial class HorizontalCssMenu : System.Web.UI.Page{    protected void Page_Load(object sender, EventArgs e)    {        if (!IsPostBack)        {            LoadMenu();        }    }    private void LoadMenu()    {        DataTable dtMenu = LoadData();        StringBuilder sb = new StringBuilder();        foreach (DataRow dr in dtMenu.Rows)        {            if (string.IsNullOrEmpty(Convert.ToString(dr["ParentID"]))                || Convert.ToString(dr["ParentID"]) == "0")            {                sb.AppendLine("<ul>");                sb.AppendLine("<li ID=\"" + Convert.ToString

create new custom list form in sharepoint designer and edit in browser

hi, i have created a new list using sharepoint designer 2007. now i inserted a custom list form to modify some field and add new ones. when i finished i will tight my new custom list to the custom form. what i want to know is. i see the status field in my new form. and i only want the status field to appear in the edit form for the one that has the permission to edit the status. then i tought of open the list in my browser and go to the list settings. but what i notice is i dont see my fields i have modified in sharepiont designer in the columns section i only see the ones from the existing list. my question is how can i hide the status field in the new item form that it only show in the edit form. and how do i get my new form in the column section so the end user can add more fields if they want without using sharepointdesigner thnx

External List Profile Pages

I have some external data sources that are related to each other. I created the associations in sharepoint designer, and they all work.  I have a page that has a list of people, that you can search, and when you search for them, it takes you to the profile page that shows the two related lists for that person. This works how I want it. What I want to do has four parts. First, on the initial page that displays my list, I want the primary field (case number) to link to the profile page for that person, instead of the display form. I have tried this with a custom action, but I don't think I did it correctly. Second, on the profile page itself, I have those two related tables that show up. One table is a questionnaire the person filled out, and one is information about interviews they were given.  In the interviews section, I would like the viewer to have an "add interview" button at the bottom, just like any list web part would have. I don't have the option in the web part properties. Finally, on the questionnaire section, I need to alter the view. Right now, there are headings across the top, with the information going left to right. I would like to set it up with a box style, like you can normally do in a list. I would also like to change the field labels from generic field names to more descriptive ones. In addition to that, the questionnaire is entere

Printing list item as a infopath form

The infopath turn off the print option and Idont know how to activate it. It is a list item that desiend with the infopath desiener and have some data conections to other listes at the same site thanks Aharon

Get all items form List using JavaScript.

Hi! I'm develop for SharePoint 2010 and I have a ribbon button with CommandAction code like this:     function demoCallback(dialogResult, returnValue) { if (dialogResult == SP.UI.DialogResult.OK) { SP.UI.Notify.addNotification(returnValue); SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK); } } var ctx = SP.ClientContext.get_current(); var items = SP.ListOperation.Selection.getSelectedItems(ctx); if (CountDictionary(items)==0) { var selectList = SP.ListOperation.Selection.getSelectedList(); //var currentList = currentWeb.get_lists().getById(selectList); alert(selectList); } var myItems = ''; var myFolders = ''; var k; for (k in items) { if (items[k].fsObjType == 0) myItems += '|' + items[k].id; if (items[k].fsObjType == 1) myFolders += '|' + items[k].id; } var options = { url: SP.Utilities.UrlBuilder.urlCombine(ctx.get_url(), '_layouts/MetaVis.Classifier2010/Classify.aspx') + '?items=' + myItems + '&amp;folders=' + myFolders + '&amp;List=' + SP.ListOperation.Selection.getSelectedList(), args: m

Updating an InfoPath Form Library Template breaks preexisting SharePoint List Views

When updating an InfoPath template (e.g. adding a new field), any views I have created on the library lose their filters and sorting, as if the columns on which they were built no longer exist.  Has anyone else encountered this and, if so, is there a solution? V/r Noelle

Adding a custom form to List's FormCollection in code

Hello, In a site within a site collection, using SharePoint Designer 2010 we have created custom Display, Edit and View forms and assigned them to the Item content type of a custom list as it's default forms. When looking at the Forms property of the list, I can see all six forms listed: the three original forms (DispForm.aspx, EditForm.aspx, NewForm.aspx) and the three custom forms (displayifs.aspx, editifs.aspx, newifs.aspx). Each site in the site collection has this custom list and I want to add these three custom forms to the custom list in each site in the collection as the default forms for items. In code I have tried copying the files from the Item subfolder of the first custom list to the Item subfolder in each list in each site, and then setting the properties for the Item content type's default forms to point to these new files (e.g DisplayFormUrl = "~list/Item/displayifs.aspx"; EditFormUrl = "~list/Item/editifs.aspx"; NewFormUrl = "~list/Item/newifs.aspx";) and I have also copied the fourth file template.asxn to this folder in each list. However, I have not found how to add these new files to the Forms property of the list iteself, as this property is read-only. It still only contains the three default forms. Is this possible to do in code? When I try to open the Display form or Edit form in

User control or sub-form inside tab-pages? Best practice?

I've got a Windows Forms application with numerous tab-pages within a tab-control. Each tab-page is a diffirent user entry form with different controls of varying types. As the application is fairly large it is important that more than one developer can work on it simultaneously. Thus we decided to create a form for each tab so that different developers could work on different forms at the same time without overwriting each other's code. Each of these "sub-forms" are then assigned its relevant container tab-page as its parent. This works well but I was wondering if this is good practice or not, after another colleague commented that we are making forms look like user controls and that we should rather be creating a user control for each tab. I've converted two of the forms to user controls with relative ease and it does work nicely as well but with one draw back. On the main parent form, e.g. frmMain, where the tab control lives, there is one single button the clear the current display. When you click "Clear display" it clears various others items displayed on the main from, finds the current selected tab and clears its contents. The latter is easy to do with sub forms as I can simply close and dispose the sub form inside the selected tab, and load a new instance. I don't have to write custom logic to go and reset/clear each control on that form. Thi

How to prevent automatic update from sharepoint list on Infopath 2007 form

Hi there, I've got an Infopath 2007 form on MOSS 2007. I have a custom list in sharepoint and the infopath form has a data connection to that list to receive data. Is there any way to prevent automatic update on the values in the form that is received from the list. I'd like the new form to have updated info received from the list. However, the old/existing forms that were created should have the data that were available at the time when the form was created. Let me know if this is not clear and I'll try to explain more. Thanks,Pman http://www.pmansLab.com/

how to add a datasource to a custom list form

hi, is this possible? if i create a new item form in SPD 2007 using custom list form, is it possible to add my own datasource to this new item form and use my own tables?

submit infopath 2003 form to a sharepoint list

hi, is it posible to add  an infopath 2003 form to a sharepoint list, not document library but a list. and can i create views from the infopath 2003 form?
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