[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Preventing edit, insert and delete

Posted on 1997-11-19
2
Medium Priority
?
153 Views
Last Modified: 2010-04-04
How can i prevent edit, insert and delete on some records
in dbgrid.
I work with the dbnavigator and dbgrid.

0
Comment
Question by:gipa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 400 total points
ID: 1350962
Well you can check for an OnStateChange or an OnUpdate (events of your DataSource).
In these events you can check which record is active and then change the state of the table to what you want. I think OnStateChange is better then OnUpdate.
Haven't tried this out. But I think it's a good idea and should work.

You can also use the Before or After Insert, Edit Delete events of TTable component.
0
 

Author Comment

by:gipa
ID: 1350963
Thank you Zifnab.
It works.

OnstateChange
  if .... then
    DataSource1.DataSet.Cancel;
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

650 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