?
Solved

dbGrid question!

Posted on 2004-05-01
11
Medium Priority
?
484 Views
Last Modified: 2010-04-05
I want to acces the tDbGrid's data as I did in tStringGrid with the Cells[x,y] property. I have tried diferent methods but I can't seem to do it.

I used "DBGrid1.Fields[0].AsString" but I get only the first row, how to I access the other one's too?

I could be something with "GotoBookmark" but I don't know how.

Please help,
Cris.
0
Comment
Question by:xtremecris
[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
  • 4
  • 3
  • 2
  • +1
11 Comments
 
LVL 7

Expert Comment

by:sftweng
ID: 10968710
The bookmark has an array prperty called "Items", containing the selected rows (and a Count of them), much like a string grid. Of course, you need to "select" the rows you want to work with.
0
 
LVL 1

Author Comment

by:xtremecris
ID: 10968890
How do I select the rows?
0
 
LVL 1

Author Comment

by:xtremecris
ID: 10968908
Please present a solution for what I want to do! By that I mean source code included.

Best regards,
Cris.
0
Independent Software Vendors: 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!

 
LVL 7

Expert Comment

by:sftweng
ID: 10968998
OK, Cris, I'll try to do that but I won't be able to send code until (at least) tomorr9ow. I invite other experts to do so in the meantime.
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 10970365
0
 
LVL 1

Author Comment

by:xtremecris
ID: 10970581
@esoftbg: there is nothing there(We're sorry, but this page is currently unavailable for viewing), please check the link.
0
 
LVL 12

Accepted Solution

by:
Ivanov_G earned 800 total points
ID: 10970695

   in DBGrid you havigate with the Dataset attached to it.

   if you want to move first/back/forward/last you use
      DBGrid1.DataSource.DataSet.First;
      DBGrid1.DataSource.DataSet.Prior;
      DBGrid1.DataSource.DataSet.Next;
      DBGrid1.DataSource.DataSet.Last;

   if you want to locate specified row use this :
   DBGrid1.DataSource.DataSet.Locate('ID', 5, [loCaseInsensitive, loPartialKey]);
   (here you want to select the row, where ID = 5 or ID starts with 5 (loPartialKey flag))
0
 
LVL 7

Expert Comment

by:sftweng
ID: 10970707
Thanks, IvanovG. An elegant solution.
0
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 10970710

  always welcome :)
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 10973287
@xtremecris,
I have no problems to download the file Q_20974690.zip as it is declared above, but you may visit
http://www.geocities.com/eosoft/
first as a web-page and then download from the link
Q_20974690.zip
Really I don't understand what happens with my yahoo web-pages. I can access them without problems, but you are the second, who alert me for "currently unavailable for viewing" message ????
emil
0
 
LVL 1

Author Comment

by:xtremecris
ID: 10973339
@esoftbg
Your code was good and I'm thinking you worked for some time at it. I wish I could reward your effort but unfortunatly I accepted somebody else's answer.

Now I can download the file from yahoo, maybe it takes a couple of hours(from the upload) for the files to become "worldwide available". I don't really know what's going on I didn't work with yahoo for uploading.

Best regards,
Cris.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month9 days, 18 hours left to enroll

762 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