如何设置货币格式,如₹123,456.00(印度)。我们可以使用Sharepoint Online进行设置。我想知道如何使用CSOM设置它。是否有enum
类型设置CurrencyLocaleId
。谢谢。
using (ClientContext context = new ClientContext("https://rohith.sharepoint.com/sites/site"))
{
context.Credentials = new SharePointOnlineCredentials(username, password);
ListCreationInformation listinfo = new ListCreationInformation();
List list = context.Web.Lists.GetByTitle("Custom List");
context.Load(list);
FieldCurrency fieldCurrency = context.CastTo<FieldCurrency>(list.AddField("Price", "Currency"));
//Here how to set Currency Format
fieldCurrency.CurrencyLocaleId = 1081;
fieldCurrency.Update();
ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
ListItem listItem = list.AddItem(itemCreateInfo);
listItem["Title"] = "Books";
listItem["Quentity"] = 12;
listItem["Price"] = 100;
listItem.Update();
context.ExecuteQuery();
}