We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Issue with columns that have a relationship

Thread ID:

Created:

Updated:

Platform:

Replies:

119147 May 14,2015 09:00 AM May 15,2015 08:23 AM LightSwitch HTML 1
loading
Tags: Grid
Josh Williams
Asked On May 14, 2015 09:00 AM

I am testing out the functionality of the HTML grid control. I have the grid up and running but am having an issue. I have 2 tables, Accounts and Orders. The order table has a relationship to the Account table. I cannot seem to select and Account when entering an order into the grid, it simply acts like a text box. I would have assumed it would be an autocomplete drop down like the Silverlight client. If I use another screen to enter the data when I view the orders grid the Account column shows "object" instead of the Account Name like "Acme Inc.". I have the Summary value set correctly and if I use the built in table view it shows correctly. Any assistance would be great.

Thanks,

Josh

Alan Sangeeth S [Syncfusion]
Replied On May 15, 2015 08:23 AM

Hi Josh,

Thanks for using Syncfusion products.

We suspect that your requirement is “Dropdown type editing on Foreign table field” and so wee have created a sample based on this and the same can be downloaded from below link.

Sample: http://www.syncfusion.com/downloads/support/forum/119147/GridLightSwitch1585561765.zip

In the above sample we have set foreign table field values to a column using “dataSource” Grid Column property and mapped the field using “foreignKeyField” and “foreignKeyValue”. Please refer the following code snippets.

var data = contentItem.application.rootUri + "/NORTHWNDEntitiesData.svc/Employees/?$top=45";

$.getJSON(data).done(function(e){

//Rendering the Grid Control

itemTemplate.ejGrid(

{

..

columns: [

{ field: "OrderID", isPrimaryKey: true, width: 80 },

{ field: "EmployeeID", width: 80, foreignKeyField: "EmployeeID", foreignKeyValue: "FirstName", dataSource: e.value, editType: ej.Grid.EditingType.Dropdown, width: 75, headerText: "FirstName" },

]

});

})



If we misunderstood your requirement then please get back to us with clear information so that we could provide you a response as early as possible.

Please let us know if you need any further assistance.

Regards,
Alan Sangeeth S

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;