I have an issue with my grid. It seems when I set properties using the property builder the values do not appear when the program is run even though the changes appear in the preview pane. That said, I can set the same properties in code, run the program and they work.
Can anyone explain why?
Thanks,
Tom
Here's a snippet of code I used. The grid is bound to a stored procedure, which I refresh after passing in a new DeptID. The grid sits inside a panel, which is set to visible after the grid is updated.
clsDept.DeptID = DeptID
rc = clsDept.GetTruckStatusByStation()
Me.grdVehicle.DataSource = clsDept.TT
Me.grdVehicle.MasterGridViewTemplate.AllowAddNewRow = False
Me.grdVehicle.ReadOnly = True
Me.grdVehicle.Columns(0).IsVisible = False
Me.grdVehicle.Columns(1).HeaderText = "Vehicle"
Me.grdVehicle.Columns(3).IsVisible = False
Me.grdVehicle.Columns(4).FormatString = "{0:MM/dd/yyyy}"
Me.pnlMain.Visible = True
Can anyone explain why?
Thanks,
Tom
Here's a snippet of code I used. The grid is bound to a stored procedure, which I refresh after passing in a new DeptID. The grid sits inside a panel, which is set to visible after the grid is updated.
clsDept.DeptID = DeptID
rc = clsDept.GetTruckStatusByStation()
Me.grdVehicle.DataSource = clsDept.TT
Me.grdVehicle.MasterGridViewTemplate.AllowAddNewRow = False
Me.grdVehicle.ReadOnly = True
Me.grdVehicle.Columns(0).IsVisible = False
Me.grdVehicle.Columns(1).HeaderText = "Vehicle"
Me.grdVehicle.Columns(3).IsVisible = False
Me.grdVehicle.Columns(4).FormatString = "{0:MM/dd/yyyy}"
Me.pnlMain.Visible = True