DBNavigator not changing DBGrid rows lazarus / 16-Databases ---------------------------------------------------------------------- OzeCode · 2013-08-04 00:33 Learning to use Sqlite3Connection with the Wiki SQLdb Tutorials 1 and 2. I noticed with the DBNavigator that clicking the Next or Prior Button does move the ScrollBar in the DBGrid but it does not move the Selected Record Pointer in the Left Column of the DBGrid. However, if I select a row in the DBGrid and then use the Next or Prior in the DBNavigator it does move the Row Pointer in the DBGrid. Is there some code I should use to ensure the Row Pointer in the DBGrid will move without having to select the DBGrid? ---------------------------------------------------------------------- Jurassic Pork · 2013-08-04 01:13 hello, it seems that it is this code in the showXXXXXXXBtnClick  which produces this problem : Code: [Select]DBGrid1.Columns[0].Visible:=false; if you comment the(o?)se lines no problem. don't hide the first column of the dbgrid. Friendly, J.P ---------------------------------------------------------------------- OzeCode · 2013-08-04 02:41 Yes, thanks JP. I commented out the line and it now works ok. Have to find another way to NOT show the first Field in the Grid. ---------------------------------------------------------------------- taazz · 2013-08-04 02:45 Try to use SQLQuery1.fieldbyname('MyHidenField').visible := False; ---------------------------------------------------------------------- Jurassic Pork · 2013-08-04 04:10 it seems that this code : Code: [Select]SQLQuery1.FieldByName('emp_no').Visible :=false; doesn"t work but this one : Code: [Select] DBGrid1.Columns.Exchange(0,1); // exchange column[0] column[1] order      DBGrid1.Columns[1].Visible := false; seems to be ok you can try also a more selective sql query (without emp_no field) than : Code: [Select] SQLQuery1.SQL.Text:='Select * FROM Employee'; ---------------------------------------------------------------------- OzeCode · 2013-08-04 22:19 Being a tutorial from Wiki I tried what was suggested. However, will test those methods you both have suggested on my computer. I normally just right click the Grid and select EDIT COLUMNS... Then add the Fields I want into the Edit and set the Alignment and Caption and font and color and width for each field. I usually set the ID (first field) to invisible or width := 0; ---------------------------------------------------------------------- taazz · 2013-08-04 22:33 Quote from: OzeCode on August 05, 2013, 12:19:20 amBeing a tutorial from Wiki [Troll mode on] Does  that hurt? how did you transfer your consciousness in to the wiki? any special equipment I should keep a an eye for ? [Troll mode off] No comments on the essence of your post though. ---------------------------------------------------------------------- OzeCode · 2013-08-05 01:55 Wiki Tutorials are there for our advantage to learn Lazarus?? What am I missing?? ---------------------------------------------------------------------- taazz · 2013-08-05 01:59 you usually read or write tutorials you can't be one your self. As I said I was only trolling don't mind me. ---------------------------------------------------------------------- OzeCode · 2013-08-05 06:25 Got me on gramma!!  HA Ha  Good one, taazz.