Hi all.
I thought this would have been a very simple task, but it has become a bit of a nightmare. How do I dynamically change the header text of a DataGrid column at runtime? I have the following code
But it doesn't do anything. I have tried putting this in Form_Load, DataGrid_PreRender, etc but it doesn't work.
Any ideas?
Stephen.
I thought this would have been a very simple task, but it has become a bit of a nightmare. How do I dynamically change the header text of a DataGrid column at runtime? I have the following code
Code:
If (objShop.deliveryCalculationMode = Entities.Shop.deliveryCalculationModeType.orderPrice) Then
Me.dgDeliveryBands.Columns(0).HeaderText = "Max Order Value"
ElseIf (objShop.deliveryCalculationMode = Entities.Shop.deliveryCalculationModeType.orderWeight) Then
Me.dgDeliveryBands.Columns(0).HeaderText = "Max Weight"
End If
Any ideas?
Stephen.