.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

WSS 3.0 Making fields read only when editing an entry

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

Is it possible to make specific fields in the EditForm Read Only so that once data has been entered it cannot be changed?

I have name and address information that once input I do not want to be changed however other fields in the form will need to be modified several times so if I can make some fields Read Only this will ensure the user modifying will only be able to change certain fields.

Some forums are suggesting Java Script however I am uncertain of whether this is the best or only option.

Thank you

View Complete Post

More Related Resource Links

List view - inline editing with read only fields

I'm new to sharepoint and using SP2010. I would like to use the inline editing feature of list view and at the same time to lock some of the fields. Is there a simpler way to achieve this like adding some field property using SP designer?

When editing a list item the fields are not blank.


This is a recent issue that I have in which I have a "Issue Tracking" List that maintains the workflow of contract renewals.

When an person goes to edit an existing list entry, the description field (standard) has the original text in the box. Prior to this the original - or any older text from a prior change was listed outside and just below the box - and non editable.

That's not the case anylonger.

Any thoughts?



Editing fields in Datasheet - Requiring Data that is NOT required


I am trying to mass update several metadata fields across all data in one library.  The library uses multiple templates, but the required columns are all the same.  I try to display just the required items, or even ALL the items in the datasheet.  Then when editing, I get the error message that some of the required data is not showing and I must add the required data.  I've triple checked my required fields in templates and the required fields in the view -- nothing appears to be missing.  Anyone have this happend and know a solution?  Editing each item one-by-one is going to be painful.


Why Are Certain Fields Always Checked When Editing View?

Whenever I edit any of the views of a particular SharePoint image library, the fields "File Size", "Name (linked to display items)", "Picture Size", and "Type" are always checked. This is a problem because if I go into the view to do something, such as change the view name, I'll unknowingly add these fields to my view unless I remember to manually uncheck them. It's a real annoyance and I'm hoping someone can enlighten me as to what the problem is. I don't seem to get this behaviour on any of my other image libraries.

List View Fields/Columns read only


i programmtically add a view to a SP List. Within this view I want to make some columns read only to certain group of users. How should I implement this?

Here is my code for creating an view programmatically:
public partial class _Default : System.Web.UI.Page 


    protected void Page_Load(object sender, EventArgs e)


        SPSite mySite = new SPSite("http://spserv");

        //SPWeb myWeb = mySite.OpenWeb("/vst");

        using (SPWeb oWebsite = mySite.AllWebs["website_name"])


            oWebsite.AllowUnsafeUpdates = true;

            SPList oList = oWebsite.Lists["list_name"];

            SPViewCollection collViews = oList.Views;

            string strViewName = "CustomView";


Making the sql server Table read only Error


Hi all ,

Iam want to create the Table Read only User or Admin can not Modify its contents i tried the below but with this we cant update the record but we can Delete the table record .


use TestDB

    somedata    varchar(40) not null

INSERT mytable ( somedata ) VALUES( 'XYZ' )
INSERT mytable ( somedata ) VALUES( 'ABC' )
INSERT mytable ( somedata ) VALUES( 'WXY')
INSERT mytable ( somedata ) VALUES( 'Microsoft')

SELECT * from mytable
-- add a check constraint to make it read only

// Update mytable set somedata ='India' where somedata ='XYZ'

By updating the table record iam getting the error but when iam going to Delete the record 

Delete from mytable where somedata = 'XYZ'

//Easily deleted the record without any error


Give me the idea how i make the table read only ???

Best Regards 


Unable to read the security policy file for trust level 'WSS_Minimal' after editing 'Alternate Ac



This is my first post, so I hope that I have picked the correct forum - it seemed the most appropriate.
I am pretty green when it comes to SharePoint admin, but as it was going so well I got a bit over-confident and tried out the 'Alternate Access Mapping'.  I didn't intend to save any changes, but I must have, because now under:

Central Administration > Operations > Alternate Access Mappings >
Edit Public Zone URLs

the 'Default' is "http://<myServer> : <port>"

and afaik there was no setting there before.  Unfortunately, I can no longer connect to http://myServer : port, although I can connect to the 'Central Administration' site on http://myServer : otherPort.  Apologies in advance for the data dump below, but if anyone has any suggestions on what I could've done (or even better what I could do to fix it before tomorrow :-) I would be very grateful.

Here are the errors that I saw/see in the browser:

How do I read an Dbase V Table with more than 400 fields?


I need to read a dbase V table with more than 500 fields.

The example:


string filepath = "c:\\prueba\\";


OdbcConnection CC = new OdbcConnection("Driver={Microsoft dBase Driver (*.dbf)};SourceType=DBF;SourceDB=<

Making Ajax Callbacks to the Server Using jQuery with ASP.NET

In the first part of this article series I introduced jQuery's functionality and how it provides a rich client side programming model. This time around I'll expand on these concepts and show you how you can use jQuery in combination with ASP.NET using it as an AJAX backend to retrieve data. I'll also discuss how you can create ASP.NET controls and otherwise interact with jQuery content from ASP.NET pages in WebForms.

jQuery is just a JavaScript library so it will work seamlessly with ASP.NET both from page code as well as through backend driven code using the Page.ClientScript object or ScriptManager. You can use jQuery on its own as a client side and Ajax library that communicates with ASP.NET or you can use jQuery in combination with ASP.NET AJAX. The two actually complement each other quite well as jQuery provides functionality that the ASP.NET AJAX library does not and vice versa. For the most part the interaction between the two libraries is trouble free except for a few very rare edge cases.

Editing the Data in a GridView

In addition to deleting a GridView's underlying data, another common need is to allow end users to edit the data displayed in a GridView. With ASP.NET 1.x's DataGrid control, editing the data is certainly possible, but requires creating three event handlers and writing a dozen or so lines of code. With the GridView and ASP.NET 2.0, it is possible to create an editable GridView without writing a single line of code! All of the necessary functionality is encapsulated within the GridView.

The GridView allows editing on a row-by-row basis. An editable GridView contains an additional column with an Edit button in each row. When the end user clicks on an Edit button that row becomes editable, causing the Edit button to change to Update and Cancel buttons and the other columns to become TextBoxes. The end user can then update one or more column values and click Update to save their changes.

How Do I Enable Inline GridView Editing?

Now that you have created a site with Edit and Details views, how do you enable inline editing in a GridView control? This video shows you how, and also touches on routing.

Custom Editing Behavior for DataGridView TextBox Columns

For various reasons I'm using a DataGridView instead of a ListView, and while configuring the DataGridView to look like a ListView wasn't much of a problem, there's one thing that got on my nerves, which is the behavior of textbox cells in edit mode: It is much too easy to leave the edit mode accidentally, simply by pressing the cursor keys at the wrong time. For example when the text caret is positioned behind the last character of the textbox cell content, and you press the right arrow key

Making Sense of ASP.NET Paths

ASP.Net includes quite a plethora of properties to retrieve path information about the current request, control and application. There's a ton of information available about paths on the Request object, some of it appearing to overlap and some of it buried several levels down, and it can be confusing to find just the right path that you are looking for.

Serial Port Communication Read and Write using C#.net

In this simple article you will learn that how you can Open and read COM port data using System.IO.Ports Namespace.
Simply just create New Project of windows application in C#.

Import ServiceProcess APIs
using System.IO.Ports

Imports System.IO.Ports

Write Parsing functions which parse port data according to attached device

Gridview with a dropdown list for editing


Hello. I am working through Scott Mitchell's ASP.Net in 24 hours book. I am finishing the photo album project.

I have a GridView that retrieves a list of uploaded photo rows for the logged-in user.
The GridView is for editing and deleting rows.

The photo Category field in the Gridview is a dropdown list. The text entry field was deleted after converting this field to a Template.

Like the uploaded photos, these Categories are user-specific. They are created in another web page.

Users also have the option to select "none" for the category when they upload an image.

For the GridView:  The Category ID field's ItemTemplate and EditItemTemplate both have a " - None - " choice added to them.

I am getting this error:

'pictureReadOnlyCategories' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value


Note: The ID for the ItemTemplate for that dropdown list is the ID listed above in the error: "pictureReadOnlyCategories".


Am I missing some step in this process of changing a GridViews text field to a dropdown that can be used for editing? I went through the book's instructions three times.

Here is my code for the dropdown list and a screenshot of the Design

Problem making Role based Menu in MVC application



 I want to make Rolebase menu in MVC such that if user doesnot have permission for some action then that Action name shouldnot be shown in the Menu.

 I have used the code in the url(http://forums.asp.net/t/1566328.aspx) in my MVC application.My application is a Discussion Forum(in MVC) same functionality as in this forum forums.asp.net

 I have used Controllers for post, thread etc.In each controller there are some actions that are using [Authorize(Roles)] attribute

 but this coding does not count  those Actions in Controllers having Authorize attribute according to the url http://forums.asp.net/t/1566328.aspx 

 In the code, Authorize attribute is applied to Controller class, but my requirement is of Applying Authorize attribute to some actions in controller so that some are available for all users and  some links are available rolewise.Now what is the solution for that?



Scripts not read when in head tag


I just upgraded to VS2010 if that matters.  I'm learning JQuery and noticed that scripts don't work if they're in the head tag.  Also, I need the script tag with type="text/javascript" in the head (with nothing else) in order for the JQuery scripts in the body to work.

Very bizzare, any suggestions?

With a separate script tag in the <body> with my JQuery script, this works

<head runat="server">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" />
<script type="text/javascript">

This doesn't:

<head runat="server">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" />

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