LLBLGen Pro exception: The multi-part identifier "MyDatabase.dbo.User.Name" could not be bound

0 Comments

If you get an exception like: System.Web.HttpUnhandledException (0x80004005): Exception of type ‘System.Web.HttpUnhandledException’ was thrown. —> SD.LLBLGen.Pro.ORMSupportClasses.ORMQueryExecutionException: An exception was caught during the execution of a retrieval query: The multi-part identifier "MyDatabase.dbo.User.Name" could not be bound..

How to get the primary key value in DeleteCommand event of a RadGrid

4 Comments

First of all you should set the MasterTableView.DataKeyNames property of the RadGrid to the primary key columns: <MasterTableView DataKeyNames="Id"> <telerik:RadGrid ID="customerOverviewRadGrid" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="customersDS" EnableLinqExpressions="false" runat="server" ondeletecommand="customerOverviewRadGrid_DeleteCommand" > <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle> <MasterTableView DataKeyNames="Id"> <Columns>