Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Making a Cell uneditable

Author  Topic 

InNomina
Starting Member

40 Posts

Posted - 2012-02-02 : 16:42:13
Sql 2008r2

Not sure if this is even possible but had a request from a customer....

I have:
records table
with 2 columns
Column1
Column2

Column 1 has a drop down selection of 2 items:
true
false

Column 2
cells are blank but editable

If true is selected in column1 then I want the corresponding column2 cell to be editable

If false is selected in column1 then I want the corresponding column2 cell to not be editable

Possible?

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2012-02-02 : 16:53:02
Do you mean in the SSMS GUI?

If so, you can use triggers for this. However, you shouldn't be editing data directly in the GUI. NEVER EVER.

Also, you should be managing who can do what with appropriate permissions explicitly granted.
Go to Top of Page

InNomina
Starting Member

40 Posts

Posted - 2012-02-02 : 18:17:35
Sorry no, it's a 3rd party records management app that views the tables/columns.

I was just wondering if this is possible via a sql script.

quote:
Originally posted by russell

Do you mean in the SSMS GUI?

If so, you can use triggers for this. However, you shouldn't be editing data directly in the GUI. NEVER EVER.

Also, you should be managing who can do what with appropriate permissions explicitly granted.



-------------------------
"If you never fail, you're not trying hard enough"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-02-02 : 18:21:00
sounds like its a presentation issue. you've code that in your application language not in sql

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -