Hi all,

I have bind datagrid dynamically through coding .. it display 2 columns at runtime.

Now i want to make the First column align Right while second to Left.

So i tried to solve it using
VB Code:
  1. DataGrid.Columns(0).Style.HorizontalAlignment = .....Right
But the problem i face is that when i use

VB Code:
  1. Datagrid1.Datasource = ds.Tables(0)
  2. 'Response.Write(Datagrid.Columns.Count)
  3. Datagrid1.Databinding()
  4. Response.Write(Datagrid.Columns.Count)

it always gives 0

I know this problem is due to dynamic column binding. But don't know how to solve it..

Help me URGENT..