jQuery UI Widgets › Forums › Plugins › Data Adapter › Composite Primary Key
Tagged: forgin key, jqxDataAdapter, key, keyvalue, value
This topic contains 3 replies, has 2 voices, and was last updated by Stanislav 2 years, 1 month ago.
Can the jqxDataAdapter support a composite primary key?
Most of my tables have a single column in the primary key.
What can I do if my table has a composite primary key? For example, my table “set_vendor_rate” has 2 columns in the primary key: vendor_id, and rate_code. Only the combination of both columns is unique.
Here is the documentation page: https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxdataadapter/jquery-data-adapter.htm
It says: “id: A string containing the Id data field.”
Does the “id field” need to be a particular data type, like int?
The data type depends on the column, if the column is set to be populated by string and you try to populate it with ‘int’, nothing will happen.
I would suggest taking a look at these demos, if you are asking for grid:
Other widgets have similar examples as well.
Question: Can the jqxDataAdapter support a composite primary key? For example, my Primary Key on my SQL Server table consists of 2 columns, both of type nvarchar(10)?
Take a look at this demo: link, it shows how to create a Grid with column which displays values from foreign data source.
You must be logged in to reply to this topic.