Advertisement
We are having a requirement to hide the unwanted columns in
the NewForm.aspx and EditForm.aspx using client side object model.
We are using the Properties SetShowInNewForm, SetShowInEditForm
to hide the fields in a particular list, if you want to show it again change it
to (true)
using Microsoft.SharePoint;
using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace hidecolumns
{
class Program
{
static void
Main(string[] args)
{
ClientContext clicon = new
ClientContext("http://dotnetsharepoint.com/sites/SharePoint");
List list
=clicon.Web.Lists.GetByTitle("yourlistname");
clicon.Load(list);
list.Fields.GetByInternalNameOrTitle("YourColumnName").SetShowInNewForm(false);
list.Fields.GetByInternalNameOrTitle("YourColumnName").SetShowInEditForm(false);
clicon.ExecuteQuery();
list.Update();
}
}
}
79BA8E1411
ReplyDeleteTakipçi Satın Al
Footer Link Satın Al
MMORPG Oyunlar
PK XD Elmas Kodu
War Robots Hediye Kodu
6F18305A4D
ReplyDeletepara kazandıran oyunlar
para kazanma
temu güvenilir mi
A4807FCC
ReplyDeleteesçort burdur
erbaa esçort
ataşehir olgun esçort
serik esçort
siverek esçort
altındağ esçort
yenişehir esçort
adıyaman esçort
esçort kırşehir