I have two scenario's where I am using a radgrid with a domain data source control and allowing Insert, Update and Delete. Currently, I have an Order object that has two foreign keys, one for Company and the other for Customer. I use two grid dropdown controls to represent the foreign keys and the display of items in the grid are fine when I edit. The problem I am having is that when I try to update the order and review the order object the references to the foreign keys are null.
This is a codeless implementation...please advise what I may be doing wrong.
Actual error is: The required entry 'CompanyID' was not found in the provided input. This entry is required by the key fields
<
telerik:RadGrid ID="RadGridOrder" runat="server" Skin="Outlook" AllowPaging="true"
DataSourceID="ddsOrder"
ValidationSettings-EnableValidation="true">
<Clientsettings allowkeyboardnavigation="true" enablepostbackonrowclick="true">
<Selecting AllowRowSelect="true" />
</Clientsettings>
<MasterTableView DataSourceID="ddsOrder"
AllowAutomaticInserts="false" AllowAutomaticDeletes="true" AllowAutomaticUpdates="true"
AutoGenerateColumns="false" DataKeyNames="OrderID" >
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton"> </telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="OrderID" HeaderText="ID" UniqueName="OrderID" SortExpression="OrderID" Visible="false" Display="true">
</telerik:GridBoundColumn>
<telerik:GridDropDownColumn FooterText="Seller" UniqueName="Seller"
ListTextField="CompanyName" ListValueField="CompanyID" DataSourceID="ddsGetSellers"
HeaderText="Seller" DataField="SellerID" AllowSorting="true">
</telerik:GridDropDownColumn>
<telerik:GridCheckBoxColumn DataField="IsAcceptedBySeller" HeaderText="Seller Approved" UniqueName="IsAcceptedBySeller" ></telerik:GridCheckBoxColumn>
<telerik:GridDropDownColumn FooterText="Buyer" UniqueName="ddlBuyers"
ListTextField="CompanyName" ListValueField="CompanyID" DataSourceID="ddsGetBuyers"
HeaderText="Buyer" DataField="BuyerID" AllowSorting="true">
</telerik:GridDropDownColumn>
<telerik:GridCheckBoxColumn DataField="IsAcceptedByBuyer" HeaderText="Buyer Approved" UniqueName="IsAcceptedByBuyer" ></telerik:GridCheckBoxColumn>
<telerik:GridBoundColumn DataField="ShippingCity" HeaderText="Ship To City" UniqueName="ShippingCity" SortExpression="ShippingCity">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ShippingStateProvince" HeaderText="Ship To State" UniqueName="ShippingStateProvince" SortExpression="ShippingCity">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ShippingZipPostalCode" HeaderText="Ship To Zip" UniqueName="ShippingZipPostalCode" SortExpression="ShippingZipPostalCode">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
<
cc1:DomainDataSource runat="server" ID="ddsOrder"
DomainServiceTypeName="G7.ePOD.PaymentSettlement.Business.OrderDomainService"
SelectMethod="GetCartOrders" EnableUpdate="true" EnableInsert="true" EnableDelete="true" >
</
cc1:DomainDataSource>
<
cc1:DomainDataSource runat="server" ID="ddsGetBuyers"
DomainServiceTypeName="G7.ePOD.PaymentSettlement.Business.OrderDomainService"
SelectMethod="GetBuyers" EnableUpdate="false" EnableInsert="false" EnableDelete="false" >
</
cc1:DomainDataSource>
<
cc1:DomainDataSource runat="server" ID="ddsGetSellers"
DomainServiceTypeName="G7.ePOD.PaymentSettlement.Business.OrderDomainService"
SelectMethod="GetCompanies" EnableUpdate="false" EnableInsert="false" EnableDelete="false" >
</
cc1:DomainDataSource>