Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

CanSelect on a DBGrid

Posted on 2001-07-25
1
Medium Priority
?
288 Views
Last Modified: 2010-04-06
Is it possible to a cell in a DBGrid, so the user can not access to it.
For example, the column Status can be changed by the user if the status is OK or DEL, but can not change it if it is something else.
0
Comment
Question by:frdep
1 Comment
 
LVL 2

Accepted Solution

by:
Drareg earned 200 total points
ID: 6319729

You can try this :


Procedure TForm1.DBGrid1CellClick(Column: TColumn);
Begin
  If Table1Status.Value In ['OK', 'DEL'] Then
    Begin
      // If you use a drop box.
      Column.ButtonStyle := cbsAuto ;
      Column.ReadOnly    := False ;
    End
  Else
    Begin
      Column.ButtonStyle := cbsNone ;
      Column.ReadOnly    := True ;
    End ;
End ;
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question