Hi,

This should be simple, but, alas, it's not. I'm creating a datagrid dynamically in VB.net. I would like to increase the width of the datagrid after it has been created to put some spacing between the columns.

I've tried to accomplish this like so:
VB Code:
  1. dGrid.Width = Web.UI.WebControls.Unit.Percentage(dGrid.Width.Value * 1.5)
; however, dGrid.Width.Value is 0.0 even after my datagrid has been populated with data. How can I increase the width of the datagarid without assigning some arbitrary value like this:
VB Code:
  1. dGrid.Width = Web.UI.WebControls.Unit.Percentage(60)
? I want to size the datagrid dynamically based on it's width after it's populated.

Thanks,
1Source