I don't set up any columns at design time; this happens automatically when I get my data and do a SetDataBinding(). When some of these columns contain date info, how do I set the format? I tried setting the format by saying grid.DisplayLayout.Bands[0].Columns[columnName].Format = "d " right after the SetDataBinding, but it didn't change the look of that column. Should I be doing this in an event of some sort?
Using InitialieLayout is a good idea. But it's not absolutely neccessary. Setting the format right after setting the DataSource (or calling SetDataBinding) should work just fine.
My guess is that something else in your code is overwriting the format setting for the column after you set it.
Also... if you are doing this in InitializeLayout, it's a good idea to use e.Layout, rather then grid.DisplayLayout.
You have to set the column style in Initialize layout event of the grid. As soon SetDataBinding is called, the InitializeLayout event will be fired. So set the column style to Date in InitializeLayout event.
If you need a specific format, the best way is to format the data in source. If you have an stored procedure (SP) to load the data, bring in the format in SP and bind it. If not you can specify the format in initializelayout as
Example: For a column type as double,
grid.DisplayLayout.band(0).Columns("YourColumnName").format = "##0.00"