This is a migrated thread and some comments may be shown as answers.

[Solved] Using grid with domain data source

1 Answer 145 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Fred Dennis
Top achievements
Rank 1
Fred Dennis asked on 18 Feb 2010, 05:05 PM
Greetings,

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>

 

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 24 Feb 2010, 06:21 AM
Hi Fred,

I reviewed the code snippet, and it looks correct. If the issue persists, you can open a formal support ticket, and send us a small working project, demonstrating your setup, and showing the unwanted behavior. We will debug it locally, and get back to you with more information on the matter.

Kind regards,
Yavor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Fred Dennis
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or