jQuery UI Widgets › Forums › Grid › Update Tables with dropdown
This topic contains 3 replies, has 2 voices, and was last updated by Peter Stoev 11 years, 3 months ago.
-
Author
-
I have 3 tables. Products, prices and stores.
Products Table
————-
idProducts ProductName fkCategoryPrices Table
————idPrices fkProductID fkStore Price PriceDate
Stores Table
———
StoreID StoreNameHow can I update these related table through a form? I am trying to implement DropDown boxes from each table ; for example displayMember: ‘ProductName’,
valueMember: ‘idProducts’ but how can I create a second DropDown and load data from Stores Tables like before? example I need another DropDown that loads the StoresID and StoreName so when I click it will submit the “valueMember”.I hope you understand the situation… is there any other way to update the data? thanks…
Hi riyasrawther
I can suggest you a way to implement a DropDownList in jqxGrid which has displayMember and valueMember:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/gridkeyvaluescolumnwitharray.htm?arctic
When a cell is edited, the “cellvaluechanged” event is raised so you can listen to that event and inside the event handler you can implement the required additional actions.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Thank you for the reply.
But the answer is not helped me. i need to add two more drop-down list to a form. The displayMember should be “ProductName” and the valueMember should be the primaryKey “ProductID” from “Products” Table.
Another dropdown dynamically populated from another Table called “Categories”. The valueMember should be the primary key (ID) and the Display-Member should be a column.
how can I achieve that?
ThanksRiyas Rawther
Hi Riyas,
The sample I sent you shows how to add 1 DropDownList to Grid with displayMember and valueMember. For Adding two or more DropDownLists, you can use the same approach. We can give you only pointers, but the business logic specific to your application shouldn’t be implemented by our team.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.