Nov 8, 2000 #1 DTRNTR MIS Jun 27, 2000 34 US Hello, Can anyone tell me how to programmatically set Column Names and Width on DBGrid? Thank You.....
Hello, Can anyone tell me how to programmatically set Column Names and Width on DBGrid? Thank You.....
Nov 13, 2000 #2 swilliams Programmer Aug 23, 2000 583 BM Width: DBGrid.Columns(0).Width = 100 DBGrid.Columns(1).Width = 200 ..... (I think). I do not think you can set the names of the columns, although I have never tried. You might want to try: DBGrid.Columns(0).Name = "Column_Name" Although I am not sure if this will work. Simon Upvote 0 Downvote
Width: DBGrid.Columns(0).Width = 100 DBGrid.Columns(1).Width = 200 ..... (I think). I do not think you can set the names of the columns, although I have never tried. You might want to try: DBGrid.Columns(0).Name = "Column_Name" Although I am not sure if this will work. Simon
Nov 13, 2000 #3 tallman64 Programmer Nov 2, 2000 8 CA This is how i do it DTRNTR: .caption is the column name on the DBGrid (DBGrid_Display) With DBGrid_Display .Columns(0).Caption = "Your Column Name" .Columns(0).Width = 2000 .Columns(0).Visible = False End With Chris (Tallman64) Upvote 0 Downvote
This is how i do it DTRNTR: .caption is the column name on the DBGrid (DBGrid_Display) With DBGrid_Display .Columns(0).Caption = "Your Column Name" .Columns(0).Width = 2000 .Columns(0).Visible = False End With Chris (Tallman64)
Nov 13, 2000 Thread starter #4 DTRNTR MIS Jun 27, 2000 34 US Thank You Simon ! Thank You Chris ! Upvote 0 Downvote