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


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

Disable Edit on a SPList

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :C#
 

Hello

  I do not want a field to display on the editform.aspx.  I tried

list.Fields["myfield"].ShowInEditForm =false;

list.Update(); 

but this did not work.  A complication is that it is the only field that is on the editform.

Thanks

 

There is a permissions setting under advanced list settings that I set to No Edit Access but the edit button is still available on DispForm.aspx




View Complete Post


More Related Resource Links

Disable edit after updating status to "completed"

  

Currently we have a list which items can be edited by two SPgroups.  However, the customer would like to "lock" the individual list item after it is marked as "completed" from one or both of the SPgroups.  The list item should be displayable however not editable. 

Any suggestions as to how this can be done ... I have looked at workflows, target audiences, and javascripting, however, my investigation has been fruitless.

Any help would be greatly appreciated.


Disable edit after updating status to "completed"

  

Currently we have a list which items can be edited by two SPgroups.  However, the customer would like to "lock" the individual list item after it is marked as "completed" from one or both of the SPgroups.  The list item should be displayable however not editable. 

Any suggestions as to how this can be done ... I have looked at workflows, target audiences, and javascripting, however, my investigation has been fruitless.

Any help would be greatly appreciated.


How to disable f12 key in keyboard in asp.net?? and How to edit and access registry value of operati

  

How to disable f12 key in keyboard in asp.net??help me ...
How to disable f12 key in keyboard in asp.net??
How to edit and access registry value of operating system using asp.net and how to disable usb port function using asp.net ??
help me ...

How to disable f12 key in keyboard in asp.net??help me ...

How to disable f12 key in keyboard in asp.net??


How to edit and access registry value of operating system using asp.net and how to disable usb port function using asp.net ??


help me ...


Enable/Disable "Edit" and "Check In" buttons in Ribbon

  
We want to enable or disable "Edit" or "check in" buttons in ribbon depending upon code run in C#. We have visited a lot of resource but mostly describes for custom buttons. We need to do this for buttons provided out of the box. Any help?
http://farhanfaiz.wordpress.com

How do I remove/disable the edit in browser?

  

Hi,

Environment: SharePoint 2007

I need to disable/remove the "Edit in Browser" option from menu.

The menu appears under the document name.

Does anybody know how to do this?

Thanks,

Sharon.


How to disable "Edit in browser" and "Edit in Microsoft Office word" From Name hoverMenu?

  

Hi,

I need to disable the "Edit in browser" and "Edit in Microsoft Office Word" for a certain project.

It's inside the name hover menu. 

Any suggestions and ideas will be great.

Thanks,

Sharon

 


How to Disable/Remove Edit in Browser ?

  

Hi,

Environment: SharePoint 2007

I need to disable/remove the option "Open In Browser" from the Document name menu.

How do I do this?

I was trying to change some options in the OWS.js file. I can't find the necessary changes for this.

I can disable other options besides Edit in browser..

Why?

 

Thanks,

Sharon.    



Inplace Edit in GridView

  
In this article I am presenting a different way to look at EditItemTemplate, using which user navigation for editing is reduced and . it looks very different (see screeen shots) then regular implementation of GridView.

Edit GridView Individual Cells in ASP.NET

  
The ASP.NET GridView allows for a row of data to be edited by setting the EditIndex property of the GridView, placing the entire row in edit mode.

You may not want the entire row in edit mode if you are using DropDownList controls for several columns in the EditItemTemplate. If each DropDownList has many options then loading them all at once may result in a sluggish page. Also, if your data structure is more like a 2 dimensional array rather than a set of rows, you may want to edit each cell individually.

Here I will demonstrate how to achieve this and also how to deal with event validation without disabling it.

ASP.Net Gridview Edit Update Cancel Commands

  
In ASP.Net 2.0, GridView Control also provides the functionality to edit and update the data retrieved from the database using CommandField template. You can cancel the action using Cancel Command of the CommandField. GridView consists of events that can be used to perform the actions like edit, update and cancel upon the Data items displayed in the ASP.Net GridView Data Control.

Edit Individual GridView Cells in ASP.NET

  
The ASP.NET GridView allows for a row of data to be edited by setting the EditIndex property of the GridView, placing the entire row in edit mode.

You may not want the entire row in edit mode if you are using DropDownList controls for several columns in the EditItemTemplate. If each DropDownList has many options, then loading them all at once may result in a sluggish page. Also, if your data structure is more like a 2 dimensional array rather than a set of rows, you may want to edit each cell individually.

ASP.NET GridView - edit records using JQuery Dialog

  
There are many ways in which you could modify modular data in Grid View:
1. Inline by making rows editable when u click on Edit
2. By using separate pages for Edit
3. By using popups/dialogs for adding/editing

Gridview Edit on Searching of Record

  

using Asp.net c#

sql server

i am searching a record from my database and displaying it in gridview now i want the comments should be updated as per the record which is being searched

For E.g if record No.3 is searched then only i can update record no.3 and i don't want rest of data to be shown


now what is happening when i click on edit my whole table is being displayed

this is bcuz i made one method gridfill() which i m calling everytime if i m doing grid row editing,row cancelling and row updating

how i can resolve this thing

my code

 protected void GridView2_RowEditing(object sender, GridViewEditEventArgs e)
    {
        GridView2.EditIndex = e.NewEditIndex;
        gridfill();

    }

 protected void GridView2_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        string id = GridView2.Rows[e.RowIndex].Cells[0].Text;
        TextBox t;
        t = (TextBox)GridView2.Rows[e.RowIndex].Cells[2].Controls[0];
        string query = "update user1 set comments=@comments where id=@id";
        SqlConnection con = new SqlConnection(connstr);
        con.Open();
        SqlCommand cmd = new SqlCommand(query, con);
        cmd.Parameters.AddWithV

How to let user edit selected gridview columns, not entire row

  

Hello!-

I've got a gridview I would like to let the user edit a couple of columns.  Seems like everything I'm coming across so far makes the entire row editable.  

Hopefully the solution isn't too complicated.  Can someone point me in the right direction?

 


Detecting Edit or Insert Page

  

I am coding a .cs file that handles the metadata for a particular table. I am putting a custom validation that allows me to update or insert only if the PubMedID is not already in the database. This would be easy except that the PMID should also be allowed to be null as some of the references in the database were not from PubMed. So i perform a query on the database to see if there is already an identical PMID in the database. This works great when using Insert. However, when using Edit, it does not. The PMID is already in the database because the one currently being edited has the same PMID!!! So I know exactly how to change my query etc. However, I do not know how to tell from inside this Edit/Insert agnostic page, which one it is being called from. Thanks for your help! 


LINQ with GridView and edit fields

  

My project includes a grid view which displays information of inventory items (Assets), data is quried from AssetTable. The GridView has a command field to allow editing, below is a description of the tables and how data is displayed

Tables

BuildingTable: (BuildingID, BuildingName)

AssetTable: (BuildingID,..,....,....)

 

ItemTemplate: Using a LINQ query I join the two table and displays in a label control a string which includes BuildingID and BuildingName (5 North Building)

 EditItemTemplate: Using a LINQ query I populate a DropDownList with strings of BuildingID and BuildingName same as above.
 
Here  issue which I need to resolve:
1.  ItemTemplate display the correct information (BuildingID BuildingName) but when I switch to EditItemTemplate the pair that is 
displayed is the first one on the list, how do I make is scroll to the item which was displayed in the label ?
 
 
 
<asp:CommandField ShowEditButton="True" >
                    <ControlStyle Wi

Use Membership but bypass / disable password usage for users

  

I have an application that does LDAP authentication. The authentication is done on the code behind page of my Login.aspx page. Once the user passes LDAP authentication, a cookie is set and I redirect:

FormsAuthentication.RedirectFromLoginPage(UserName.Text, False)

I would like to setup membership in my application and keep track of some user information. But due to company security requirements, I cannot store user passwords on my application. That must stay on the LDAP server only.

Is there a way to store users but disable password storage on the aspnet_membership table?


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