please chk the solution provided in the following link
http://www.dotnet247.com/247referenc...55/278148.aspx
Happy Coding....
wrote:
> Sorry for crossposting but I'm not sure which group is more active.
>
> I am having problems getting a reference to a column in an
> auto-generated asp.net datagid in VS.Net 2003. I remember reading a
> while back that if the columns are autogenerated then a datagrid cannot
> get a column reference...i.e. the autogenerated columns are not added
> to the columns collection.
>
> Does anyone know a workaround? The reason I have to autogenerate the
> columns is because depending on some user choices the datasources for
> the datagrid can come from vastly different schemas.
>
> Thanks.