I'm trying to set two datakeys using the DataKeyNames property of an asp.net GridView.
I have a simplequery as follows:
Castle.ActiveRecord.Queries.SimpleQuery<ARMapping.CONFIGURATION> c = new Castle.ActiveRecord.Queries.SimpleQuery<ARMapping.CONFIGURATION>(@"
select c from CONFIGURATION c left join c.LUserConfiguration luc left join luc.User u left join u.Dealer d left join c.TRUCK t");
In the databind operation, the dealership would be evaluated as follows:
<
% Eval("LUserConfiguration.User.Dealer.DealershipID") %>
But when I try to set DataKeyNames="ID,LUserConfiguration.User.Dealer.DealershipID", I get error: " DataBinding: 'ARMapping.CONFIGURATION' does not contain a property with the name 'LUserConfiguration.User.Dealer.DealershipID'. "
It doesn't complain when it's Eval'd, but I can't put Eval in the DataKeyNames property.
Any ideas?