Questions tagged [readonly-attribute]

126 questions
2
votes
4 answers

Setting readonly using ng-readonly dynamically is not working

I am fetching some data from the database server and displaying the same in tabular format on my GUI. I want to achieve the following in my GUI design (a) Any cell in the table should be editable except the first column in the table. (b) The first…
Satya Narayana
  • 454
  • 6
  • 20
2
votes
2 answers

Read-only PropertyGrid

I need to show an object in PropertyGrid with the following requirements: the object and its sub object must be read-only, able to activate PropertyGrid's CollectionEditors. I found a sample that's closely match to what I need but there's an…
2
votes
4 answers

css input textbox readonly to set background color not working

I have an old Classic ASP form that I need to add functionality to and I am using IE11. I decided to insert a doctype as follows (which I am not sure why or if it is necessary): And added to my CSS file: input[readonly] { …
Glen
  • 802
  • 1
  • 11
  • 27
2
votes
2 answers

MVC EditorFor Optionally ReadOnly

Yesterday, after extensive testing, I got the following to optionally apply the readonly attribute to a control based on the value of ViewBag.CanEdit; @Html.EditorFor(m => m.Location, new { htmlAttributes = new { @class = "form-control", @readonly =…
Ray
  • 342
  • 5
  • 15
2
votes
3 answers

Is there a READ-ONLY HTTP response header?

Using REST principles and HTTP headers, I want to tell my clients that my response is READ-ONLY. My Content-Type is text/plain. Some of my responses are READ-ONLY and others are not, and my client can't tell the difference until he does a PUT and…
VernonFuller
  • 1,445
  • 2
  • 10
  • 10
1
vote
1 answer

How can I get SQL Server database properties from C# code?

I've a C# 4.0 console application and a SQL Server 2008 database up and running on database server. Does somebody know if there is a way to get the database properties (like "Database Read-Only" ) from the C# code? My guess is it should be, but I…
1
vote
1 answer

Dynamically creating read-only attributes

I'm currently trying to create a class that inherits from set, but allows calling for subsets with attributes. Since I want to create this class such that I can use it in any context, I want to have it be able to create attributes from any given…
1
vote
1 answer

Apache POI - Excel - File->Passwords->"Read-only recommended" (How to disable)

I have several xlsx files that have the "read-only recommended" flag set. Is there a POI 5.x method available to disable this checkbox? I looked through POI XML Properties with no luck.
Larz
  • 23
  • 3
1
vote
0 answers

java Files.copy copy readonly attribute without COPY_ATTRIBUTE option

i try to copy files without their filesystem attributes. there are some readonly only files, but i do not want their copy to be readonly. so i use Files.copy(src,target,REPLACE_EXISTING); but... the target gets the readonly attribute without…
MarioSemo
  • 11
  • 2
1
vote
1 answer

Excel: Can cells be made read only without protecting sheet?

This is a bit of a niche question, as generally it would be preferable to protect the sheet, but I would argue in some cases you simply need to protect the contents of the cell to avoid accidental edits and deletions without limiting editability of…
pmackni
  • 307
  • 3
  • 12
1
vote
0 answers

Python: a function receives a memory-intensive argument. This argument should be read-only. What is the best way to do it?

A system I'm developing allows external users to develop plugins, which are basically subclasses of a predefined interface. An initialise() function is called which receives an argument called data from class Data. I would like to forbid the…
Chicoscience
  • 975
  • 1
  • 8
  • 18
1
vote
1 answer

Write in a read-only file

I am trying to open a read only file, read from it and write in in another read-only file but I get the following error TypeError: excepted str, bytes or Os.Pathlike object, not NoneType My code goes like : copy_file=file with open(os.chmod( file,…
1
vote
1 answer

Is there a way in Emacs to fill a paragraph containing some read-only characters?

In Emacs I am using cm-mode with markdown buffers. cm-mode inserts a few read-only characters to indicate document changes. When I issue fill-paragraph the fill is aborted with the message read-only Text. Is there a way to fill a paragraph…
halloleo
  • 9,216
  • 13
  • 64
  • 122
1
vote
1 answer

Typescript: assign a readonly attribute in a function inside the constructor

I have a class with a readonly attribute that I define inside a functioninside the constructor, the compiler issues an error I do not know how to solve: class TEST { public readonly desc: string; constructor() { …
Plastic
  • 9,874
  • 6
  • 32
  • 53
1
vote
4 answers

Usage of const in C#

I would like to make the cert variable below to be a const? When I do that, I get an error, "The expression being assigned to cert must be a constant". I have seen articles online asking to convert it to static readonly as opposed to const, and also…
LearnToImprove
  • 345
  • 5
  • 15
1 2 3
8 9