Hi all
I have an RADGrid which is bound to an ObjectDataSource. I use an SQLDataReader to read a self joined table from the database. After having tried several sql statements with table aliases, I ended up with the following (simplified) sql statement:
Select F.SysID, F.Companyname, F.Address, K.sysID As ConsSysID, K.Companyname As ConsCompanyname, K.Address As ConsAddress From Company As F Left Outer Join Company As K on F.ConsolidatedWithID = K.SysID
In cases where a company belongs to another company (holding structure), the field ConsolidatedWithID contains the SysID of the holding company it belongs to. When reading the SqlDataReader, objDataReader("ConsCompanyname") returns the correct value from the database. However in my RADGrid the GridBoundColumn with DataField = "ConsCompanyname" doesn't show any value.
Any help appreciated. Thanks.
Jürg
I have an RADGrid which is bound to an ObjectDataSource. I use an SQLDataReader to read a self joined table from the database. After having tried several sql statements with table aliases, I ended up with the following (simplified) sql statement:
Select F.SysID, F.Companyname, F.Address, K.sysID As ConsSysID, K.Companyname As ConsCompanyname, K.Address As ConsAddress From Company As F Left Outer Join Company As K on F.ConsolidatedWithID = K.SysID
In cases where a company belongs to another company (holding structure), the field ConsolidatedWithID contains the SysID of the holding company it belongs to. When reading the SqlDataReader, objDataReader("ConsCompanyname") returns the correct value from the database. However in my RADGrid the GridBoundColumn with DataField = "ConsCompanyname" doesn't show any value.
Any help appreciated. Thanks.
Jürg