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!

Select a Specific Cell in a TAdvStringGrid

Status
Not open for further replies.

tjcusick

Programmer
Dec 26, 2006
134
US
I am using Delphi 2007 and TAdvStringGrid v 3.5.1.1

i am using the following code:
Code:
         with asgProducts do begin
            zValue:=Trim(Value);       //Trim excess spaces
            LookupSKUs(zValue, asgProducts, ACol, ARow);      
                            //Get SKU information
            ARow:=RowCount-1;     //Get last row
            Row:=ARow;   //Set AdvStringGrid.Row to Last Row
            Col:=1;      //Set AdvStringGrid.Col to 2nd Column
            SetAmount;    //Procedure to calculate total value
          end;
After an item is entered into the Cells[1,row], i want to be selected and ready to enter the next item in the string grid.

{NOTE: Items are enter using a Barcode scanner set to keyboard emulation. The <ENTER> key is not being used nor is the <TAB> key. The code detects the entry is being done by the Barcode Scanner. I cannot use the barcode scanner to emulate an <ENTER> or a <TAB>.}

What is happening though is the Next Cell is selected (highlighted blue) but the cursor is still in the previous field and if another item is typed in, it over writes the previous item. I have to press the Down arrow key and then put in my next item.

Anyone that can help me, i would be very greatful...

Thank you,

Tom Cusick
 
So you want to open the form that has the stringgrid on it...scan a bar code and have that show up in the first row of the grid and then scan a second barcode and have that show up in the second row of the grid without any user action?


Leslie

Essential for database developers:
The Fundamentals of Relational Database Design
Understanding SQL Joins
 
are you sure the scanner can't generate CR (or CRLF)?
what model are you using? most modern models can do this...

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Lespaul: Yes.

whosurdaddy: its a symbol tech usb barcode scanner, LS2208-SR20007... and i'm pretty sure it doesnt generate a CR. their documentation on it is not very good.
 
According to this website one of the available features is:[tt]Advanced Data Formatting (ADF) enables users to modify data prior to sending to host computer[/tt]

you should be able to modify the data to include the command needed to jump to the next string grid row.

I found product documentation here: that shows how to set up the ADF.

HTH

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top