.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

Modifying the choices in the "Choice column"

Posted By:      Posted Date: October 18, 2010    Points: 0   Category :SharePoint


I have a "Choice column", with five possible choices. My problem is, that when I create a new item in a list, I should only be able to choose 3 of the 5 possible choices. Only when I edit an item should I be able to choose from all five choices. Is this possible to implement?

Best regards


View Complete Post

More Related Resource Links

Is it possible to populate property choices from a database?


I'm creating my first server control, and have it working where I can set up an enum and the user can set a property's choices,  based off of that enum.  But I'd like it to pull records from a database and populate the list of choices for the property from a database.  This would allow me to add a new "Host System" to the database, and the other designers wouldn't have to get a new copy of the dll.



Modifying connection String in Web config using Install Wizard



Im trying to create a Web Deployment Project, the built in setup and deployment is very good in Visual Studio, i need to able to add an additional step in the setup to change the connection string in the Web config file. Ive seen a lot of articles on how to do this and in particular this http://weblogs.asp.net/scottgu/archive/2007/06/15/tip-trick-creating-packaged-asp-net-setup-programs-with-vs-2005.aspx#7162670 I am however stuck on the final part of this tutorial, im using the code Scott provided but have two errors,  heres part of my code where the errors are

using System;
using System.Configuration;
using System.Configuration.Install;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.DirectoryServices;

 void ConfigureDatabase(string targetSite, string targetVDir, string connectionString)
            // Retrieve "Friendly Site Name" from IIS for TargetSite
            DirectoryEntry entry = new DirectoryEntry("IIS://LocalHost/" + targetSit

Interop: Get Seamless .NET Exception Logging From COM Clients Without Modifying Your Code


Using .NET objects from ASP can help you gain experience with the .NET Framework before migrating to ASP.NET. Your ASP pages will make use of the new .NET components through COM-callable wrappers (CCW). But how will you handle exceptions? This article fills you in.

Matt Adamson

MSDN Magazine January 2005

modifying isLockedOut field via an updatesql is safe ?


Need lock some users when I want.and I read isLockedOut is readonly.

I found a field in aspnet_profile table namely IsLockedOut=true/false
If I modify the record via sql is it safe way ?this may be a source of some unexpected problems ?

rendering today's date through DVWP and modifying the XSLT

I need the Current date or Today to do some simple calculations(calculated columns) such as this: =IF(AND([Due Date]< [today], [today] < ”[Due Date]”),”Red”, “Green”) Question is: To can I convert the above formula so that it works in XSL modifying the XSLT. I new at this and not sure about the syntax. Can anyone help? I am thinking it would be something like this: <xsl:choose> <xsl:when test="ddwrt:Today() &gt; @DueDate"> <xsl:text>Red</xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>Green</xsl:text> </xsl:otherwise> </xsl:choose> Obviously something is wrong with the code above...i don't get anything in return.   Thanks Cnothing for members to see

modifying an xml element

Im trying to change the value in an xml element using LINQ but I cant get it to work, heres my codestatic string soapEnvelope = @"<?xml version=""1.0"" encoding=""utf-8""?> <soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/""> <soap:Body> <DeliverMessage xmlns=""http://tempuri.org/""> <SourceXML>test</SourceXML> <transaction>a test transaction</transaction> </DeliverMessage> </soap:Body> </soap:Envelope>"; XElement xe3 = XElement.Parse(soapEnvelope); XElement xe_ref = xe3.Elements("DeliverMessage").FirstOrDefault();xe_ref.SetElementValue("sourceXML", "some xml");xe_ref is alway null, anyone know what im doing wrong here ?

Custom List Row association to multiple documents - Design choices?

I want to associate custom list entries to muliple documents. Thinking about options.   1 row will have many docs, but one doc will only have one row. Possible? Trying to keep it simple with minimal development. I was thinking I could have a unique column or the id column in the list act like a key (somehow).. and  add a required column to the document list requiring it to tie back to the list entry.  Then a view could drive listing all the docs for a particular row from a link in the list built in a custom dataview. All the docs could be in the same library. Is the the best approach? Ideas/suggestions? Thanks.

Modifying XML element value

Hi, I wrote a code to modify an elements value, it works okay but gives problems with elements that have a prefix... plz hlp XML file...<feed> <entry Prd_ID="1" Cat="A" Type="1" xmlns="http://www.w3.org/2005/Atom"> <title>ABCD</title> <g:sku>SKU</g:sku> </entry> </feed> code Dim doc As XDocument = XDocument.Load(Server.MapPath("prd.xml")) Dim df As XNamespace = doc.Root.Name.[Namespace] Dim rr = From c In doc.Root.Elements(df + "entry") Where c.Element(df + "id").Value = idd.ToString() Select c Dim prdtitle As XElement = rr.First() Dim prdsku As XElement = rr.First() prdtitle.SetElementValue(df + "title", "HelloTitle") prdsku.SetElementValue(df + "sku","HelloSKU") doc.Save(Server.MapPath("prd.xml")) I can modify the title tag value but not the sku tag value as that has a prefix g with it any ideas? yasmin 

WSE 3.0 - Modifying the Security element

Hi everyone, I'm hoping someone can help.  I'm building a SOAP client application that passed messages to a sever outside of my control.  Using WSE 3.0 and VS 2005 I'm able to generate the SOAP envelope correctly except for 1 of the server's requirements.  The specification requires that I place a specific element inside the wsse:Security element of the SOAP header.  The end result should look something like this: <wsse:Security><customnode></customnode>[other security info]</Security>. I've tried to do this with custom policies / appending a XML element to the Security node. Any help would be greatly appreciated. Thanks, John.  

change contents of page based on choices

Hi,I am using AppCode and have 6 arrays of information I want to display on my web page. However I only want three to be visible at any one time. ________________________________ |                    |                       |                 | |                    |                       |                 | ________________________________      button             button            button i.e. a table like the above.   I have created the layout and the choice buttons etc I am using querystrings to pass the changes to the webpage.The problem comes however when trying to write the code for the table diplay. Now each has a slightly different layout.My initial thought was to write

get sharepoint list item column choices using caml

basicallly the title says it all, is there a way to get a sharepoint list's column's choices using CAML query? i'm trying to get the choices using the sharepoint web service

Modifying Customizing EditForm.aspx of Doc lib breaks Upload function - Unknown Error

Part of a bigger design issue really. But does anybody know why customizing EditForm.aspx of a Doc lib breaks the Upload function? and how to fix it so it does not. My version of the editform works great, but after an upload I get Unknown Error the resulting url looks like this: https://xxxxx.edu/sites/xxxx/_layouts/Upload.aspx?List=%7b0404432B-91A3-4E18-9202-5954E3A7E0D2%7d&RootFolder=%2fsites%2fmcpharm%2ftest3&Source=https%3a%2f%2fxxxxx.edu%2fsites%2fmcpharm%2ftest3%2fForms%2fAllItems.aspx --- The bigger design issue - disregard if you like: That said, the bigger design issue is we are trying to relate one list row to many documents, but don't want to seperate the docs into seperate folders and would like the solutoin to be seamless. We are going to add a look up from the doc lib to the list, but did not want to use anythng but the List's ID column. However, we do not want users to have to manually look up List row IDs in that form, and we did not want to use a list column that can be edited, even if we can add a unique column policy. My design and thinking is to build a few custom pages with dataviews to show row level details in both lists (1 to many) and a dataview to drive list level functions like edit, delete and upload docs. I think all the pieces are there except for the less than graceful upload function that fist uploads the file and then asks the

Error when modifying permissions on Itemadded for a file upload

All, I have registered an eventhandler for a document library. On ItemAdded, I want to modify the permissions of the item such that only the uploader(creator) should have access to the file he is uploading. When I upload a file and fill in the required metadata and click on Save, I get the error"The file SubmissionForReview_Draft/Untitled.htm has been modified by SHAREPOINT\system " . But, I did verify the event fired and all appropriate permissions are set. The only explanation for this could be, the file gets uploaded, the event fired and the properties of the file has changed and then the form to add additional metadata has poped up. On clicking on save, SharePoint determines that the file for which the metadata has to be added has changed internally and throws error, which may be as expected. Question: Is there a way around this issue, maybe to suppress check on file changed ?   Thanks mano Mano Mangaldas | Blog : http://howtosharepoint.blogspot.com 

How to retrieve user details without modifying the userIsOnline

Hi,I have written an application that user the MemberShip provide.i have a page that needs to retrieve user information, such last activity, isOnlineStatus, CreateDate etc.when i use the following code the status of the user changes. Guid userKey = new Guid(userId); MembershipUser un = Membership.GetUser(userKey); ProfileCommon p = Profile.GetProfile(un.UserName); i can retrieve all the required information for the user whose GUID i provide in Line1, however irrespective of if the user is online or not the status changes to Online.please advise, i need to get the user details without updating the userIsOnline and the lastActivity stamps.

Modifying the wssuc:Welcome for anonymous users to have a Register Link

HI every one, First post so be gentle :) Spent a day and a bit on the various sites and not having much luck with my issue, and I am hoping some one can guide me I need to modify the Welcome message to have one more link for anonymous users: Register. So it will say Register | Sign In. I have tried the AnonymousTemplate but it only shows the register when you have logged in, and a few various other ways. I tried to create a custom template for the Welcome control, but didn't have my luck either. Can some one suggest a tutorial or a way forward please. Thanks Lou

Modifying Web Parts in SP 2007 using SP Designer 2007

I need to start editing existing web parts in SP 2007, and the tool I have is SP Designer 2007. What is a good reference to get started??? I have a couple types of web parts:  derivatives of lists like Announcements and OOTB web parts. I have been inside some test sites so far, and edited particularly the CSS, default.master, and default.aspx.  I can change many parts of the pages -- but not web parts.  Am I using the wrong tool with SP Designer. -M
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