haagrand.blogg.se

Change selected row in stringgrid
Change selected row in stringgrid









change selected row in stringgrid

Stringgrid1.Cells:=adoquery1.FieldByName('age'). Stringgrid1.Cells:=adoquery1.FieldByName('name').AsString I checked this with only a StringGrid with ShowMessage in onSelectCellEvent.

change selected row in stringgrid

Stringgrid1.Cells:=adoquery1.FieldByName('medicalno').AsString Also, the fixed rows/cols cannot be selected, and cell0,0 is never selected even when fixed rows/cols are set to 0. Stringgrid1.RowCount:=adoquery1.RecordCount 1, the default first column and the first line of the stringgrid control is used to make comments for you, so there will be different color display, to remove this display need to change the properties fixedrows and fixedcols, respectively, the function and number of columns locked, Changed to 0 is not locked.Ģ, stringgrid to achieve the selected whole line after the color change, you need to select the gorowselect attribute in the option.ģ, adorequest implementation insert, update, delete can be added to the SQL statement, and then execute the ExecSQL method, but if it is the query value, that is, use select to open with open method, then A ado a record, you can use the RecordCount property to determine how many records, use the next method to read one by one, the following is a piece of code: procedure TForm1.FormCreate(Sender: TObject) Īdoquery1.ConnectionString:='Provider=.4.0 Data Source=' + getAppPath()+'db\sperm.mdb' Ī('select * from report where getdate># order by getdate desc')











Change selected row in stringgrid