readonly

Rails reusing form view on edit, but setting some fields readonly

I've a model that the user isn't allowed to update most fields on after the initial creation. I've seen the :readonly HTML attribute I can tack on all field helpers, but doing conditionals on all fields feels... icky. I'm not using anything special for creating my forms at the moment, just plain HAML. Anyone know of a better way of do...

Cannot edit values of DataGridView bound to a BindingList

Hello community, I have trouble editing a databound bindinglist. Let me illustrate it with the following: Say I have the Person class: public Class Person{ private string m_firstname; private string m_lastname; public string FirstName{get;set;} public string LastName{get;set;} public Person{ ... } } I then have a containin...

Making Custom DataGridViewCell ReadOnly

I am making several custom DataGridViewCell classes to handle various cases in my C# application. One of the custom classes is associated with read-only data, so I'm attempting to make the cell itself read-only. I initially tried setting the ReadOnly property in the constructor, but doing so causes an InvalidOperationException: "ReadOn...

Looking for a better design: A readonly in-memory cache mechanism

Hi all, I have a Category entity (class), which has zero or one parent Category and many child Categories -- it's a tree structure. The Category data is stored in a RDBMS, so for better performance, I want to load all categories and cache them in memory while launching the applicaiton. Our system can have plugins, and we allow the plug...

Refreshing Read-Only (Chained) Property in MVVM

I'm thinking this should be easy, but I can't seem to figure this out. Take these properties from an example ViewModel (ObservableViewModel implements INotifyPropertyChanged): class NameViewModel : ObservableViewModel { Boolean mShowFullName = false; string mFirstName = "Wonko"; string mLastName = "DeSane"; private rea...

Open JdbcTemplate connection in read only mode (Spring framework)?

Hi, is it possible to open a JdbcTemplate connection in read only mode, so that I can't perform any changes to the underlying data source? ...

Github: readonly access to a private repo

I am developing some private projects on Github, and I would like to add nightly cronjobs to my deployments servers to pull the latest version from github. I am currently doing this by generating keypairs on every deployment server and adding the public key to the github project as 'Deployment key'. However, I recently found out that t...

How to detect a SQL Server database's read only status using tsql

I need to know how to interrogate my Microsoft SQL Server to know if a given database has been set to read only or not. Is that possible? ...

Proper way to copy a readonly NSMutableArray

I have an object with a readonly property that I am trying to implement NSCopying for. It has a mutableArray called "subConditions" (which holds "SubCondition" objects). I have made it readonly because I want callers to be able to change the data in the array, but not the array itself. This worked really well until it was time to write ...

Unknown error sourcing a script containing 'typeset -r' wrapped in command substitution

I wish to source a script, print the value of a variable this script defines, and then have this value be assigned to a variable on the command line with command substitution wrapping the source/print commands. This works on ksh88 but not on ksh93 and I am wondering why. $ cat typeset_err.ksh #!/bin/ksh unset _typeset_var typeset -i -r...

How to open GDI+ Bitmap in readonly mode?

I want to open a image(jpeg, bmp) using GDI+ using readonly mode, in c++。How can I do this? Many Thanks! ...

Why is this variable declared as private and also readonly?

In the following code: public class MovieRepository : IMovieRepository { private readonly IHtmlDownloader _downloader; public MovieRepository(IHtmlDownloader downloader) { _downloader = downloader; } public Movie FindMovieById(string id) { var idUri = ...build URI...; var html = _downlo...

Delete link to file without clearing readonly bit

I have a set of files with multiple links to them. The files are owned by TFS source control but other links to them are made to them. How do I delete the additional links without clearing the readonly bit. It's safe to assume: The files have more than one link to them You are not deleting the name owned by TFS There are no potential...

CheckBoxField columns in ASP.NET GridView are disabled even if ReadOnly set to false.

I have a GridView with two CheckBoxField columns. They both have ReadOnly property set to false, but html code generated for them has attribute disabled="disabled". So the value cannot be changed. Generated HTML example: <span disabled="disabled"><input id="ctl00_ContentBody_GridView_ctl02_ctl01" type="checkbox" name="ctl00$ContentBod...

Why Tuple's items are ReadOnly?

I was thinking to use Tuple class to store 2 integer information (StartAddress, EndAddress) I need in my program. But I discover that Tuple items are ReadOnly, so if I need to set a value for an item, I need to re-instantiate a Tuple. What is the reason behind this design decision? ...

How to make documents read-only in document libraries.

After document approval, i want set it to a final status where newer version of document cannot be uploaded or any modifications made (i don't care if it is downloaded and modified on users PC, but it must stay as is in SharePoint). I see few options here: break permission inheritance and set all roles to read only. EventReceiver on I...

Modify Git commands for Read-Only Filesystem??

Is it possible to create a Git repository that saves its objects into some database (SQLite, MongoDB, etc.) instead of on a filesystem? It looks like I could probably store a full repository in MongoDB using something like GridFS. Wondering if there is a way to make it so git push origin master reads from the database and acts just lik...

Data Management - Readonly data

Hi, I'm working on a some project in C#, and I came across the following problem: I have some data-type classes, for example a Person class, which keeps information about a person. In addition, I have a DataManager class, which is responsible of managing the persons in my program. If you want to add, get, find, or remove a person, you...

change node access with drupal module

I run drupal 6 and want to code this functionality: after the user filled out the formular he can click an extra button, which will make the form readonly for him. I thought about an hidden_field and an extra button, which after the user clicked the extra button set the hidden_field to a true state. When I load the node and the hidden_f...

How to make a listview in excel selectable but not editable in office 2007

I have a userform that allows the user to select customers from a combobox; when a customer is selected, the customer's offices (office name, city, state, address) populate a listview in Report mode. I would like the user to then be able to select (click on) a row in the listview, which triggers code that populates the office-related co...