jQuery UI Widgets › Forums › Grid › Dropdown List in Popup Edit
Tagged: dropdown list, DropDownList, edit, edit popup, grid, popup
This topic contains 13 replies, has 2 voices, and was last updated by Martin 5 years, 11 months ago.
-
Author
-
Hi, How can I add the Dropdown List to pop-up Edit in Grid? Some columns have declared a static values in database, So I need select option in edit pop-up. Can you help me?
Hello dzimen,
Yes, here is the Example from your previous topic updated with a Dropdown List in the pop-up edit menu of the Grid.
Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/I know, but this dropdown I show in table, So I need show current index, not static.
Hello dzimen,
I’m not sure that I got what you mean.
You can change the dropdown list’s source dynamically for the different rows.
In this Example the row id is set as a dropdown option.Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/The point is to show the current element of the poem in the dropdown. Look at the picture: https://zapodaj.net/4f9f0815de932.png.html
In the selected field, this field should appear immediately. If I choose “Edit” in the second row, then the dropdown is to show BR715
I create this: https://pastebin.com/RLQ082pE (updaterow.jsp)
https://pastebin.com/rKc3CVEX (this add in table)When I try edit in popup data, Data not update. In console I have error 405 and show error in this line in console: https://zapodaj.net/80e44d295bd09.png.html
I tryed move to Controller, but didn’t work (Don’t read a request.getParameter() )
Hello dzimen,
When you click on the “Edit” button of some of the rows, you can update the source of the dropdown list(if needed), as shown in the example above, and set its
selectedIndex
property so the “Program Name” of the corresponding row is shown in the field.For your issue with the server call, please refer to your other Topic, where I have answered you.
Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/When I set a selectedIndex: 0 in Edit, In first row is working (https://zapodaj.net/dc798bef86532.png.html), but in second row didn’t work (https://zapodaj.net/7caf7bec9b0c6.png.html). When i refresh and “Edit” second row, the dropdownlist show fail value… (https://zapodaj.net/6a323a97a2f42.png.html). I need show current edit value in dropdownlist
In short, I need something like this demo: http://jsfiddle.net/onbtzk2b/
It’s about a dropdownlist for Products where they show the current value. I want to get the same result for my dropdownlist but in “Edit Pop-up”This is my code for dropdownList:
$(“#name”).jqxDropDownList({
source: dataAdapter, displayMember: “name”, valueMember: “name”,
});Hello dzimen,
Please, check the Example now.
TheselectedIndex
of the dropdown list is set with the current row id every time any of the “Edit” buttons is clicked.Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/Everything is great, only that I have 10 options in the dropdown, but the records in the table are around 200+. This option is good, it would only be good if it would not return an index, it would only add value. And then I would give dataRecord.name_of_column and it will work. From what I see, selectedIndex accepts only number … Is there something that accepts value?
Hello dzimen,
Yes, you can use the
selectItem
method, instead.
I’ve updated it again: Example.Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/It works, but there are moments when it does not read any value and only after the re-opening of “EDIT” an element is shown.
Hello dzimen,
Can you show us such case?
It works fine in the example I have sent you above.Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.