Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TAdvStringGrid issues

Status
Not open for further replies.

tjcusick

Programmer
Dec 26, 2006
134
US
Delphi 2007, TAdvStringGrid: 3.5.1.1

I am using a few different techniques to get information into my AdvStringGrid (ASG). I use an external combo box that the user can select from. I use a barcode scanner that scans into the selected cell.

Once either of these is used the item cell (cell[1,row]) is filled in with the item number, then the program fills in the rest of the fields to the right of the item number cell.

First Question: How can i make the ASG select the next row and be ready for input into the first cell in that row. I have the following code in there now but it doesn't work. It selects the next cell[1,row] but the "edit" is still in the previous field. Suggestions?

Code:
  with asgProducts do begin
    zValue:=Trim(Value);
    LookupSKUs(zValue, asgProducts, ACol, ARow);
    Inc(ARow);
    AddRow;
    AddCheckBox(0, ARow, True, False);
    RowSelect[ARow]:=False;
    Row:=ARow;
    Col:=1;
  end;

Second Question: When i use the barcode scanner it fills in all the fields, and even calculates the last amount field, where as if i select the item from the combo list i have to hit the enter key to get it to calculate the amount field... any ideas why? REMEMBER my combo list is outside of my ASG...
(BTW the code is exactly the same for both entry options.)

 
regarding the barcode scanner. after a scan it usually sends a carriage return.

Aaron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top