jQWidgets Forums
jQuery UI Widgets › Forums › Grid › jqxGrid data to ListBox
Tagged: listbox and grid
This topic contains 5 replies, has 2 voices, and was last updated by Peter Stoev 10 years, 10 months ago.
-
AuthorjqxGrid data to ListBox Posts
-
Hello,
Can any one please help me how to move selected row (1 row only) from jqxGrid to ListBox.
what my concern is ?
1. I have jqxGrid with 5 columns, out of which last column in “Action” where i want to create a “Add” button in each row in grid data
2. When i click that “Add” button of that particular row, all the columns (or few columns.. anything would be fine) of that row should be moved to a List box automatically.What i have done so far?
1. I created jqxGrid data and populated the data inside it.
2. I created an empty “listBox” just right side of it.I am not able to dynamically attach event to the “Add” button of individual row.
Also, any better innovative ideas/solutions are most welcome !!!
Can you you please help ! Thanks !!
Hi adarsha,
1. You can use the Grid’s “getrowdata” to get the data of a specific row: http://jsfiddle.net/jqwidgets/7pdyg/
2. I suggest you to see the Popup Editing demo which shows how to create a Button Column and handled the Button clicks.
3. The jqxListBox has method called addItem. You can use it for adding new items. Example: http://jsfiddle.net/jqwidgets/YkeU9/Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Thanks Peter !
I gone through the links you gave. Sounds good. I like the way you suggested to merrge them.
But, i may be thinking loud here that, i wanted to achieve this functionality in one click. What i mean here is, i wanted to associate a common event to each Add button in the column for each row and when clicked the row should automatically be added to listBox (the latter one is clear with your second link).
I am looking for a technique where Add button in each row is automatically add that particular row to the listBox !!
Hope i am clear
Hi adarsha,
I understood what you want from your first post and that’s why I suggested you to look at these examples. You should implement the “buttonclick” callback function of your Button Grid Column and then use the combination of getrowdata of jqxGrid and addItem of jqxListBox to achieve what you need.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/Also, is there any method/property that i can use for listBox such that, when I hover on the items in the lisBox, that item is highlighted and ‘x’ mark at the right top corner of the highlight to remove the item from list box.
It would be reall nice when i add the item to listBox the item should sit in listBox with ‘x’ where i don’t need to hover as well.
If this is available, i can avoid creating a new button lets say “Remove” to remove the items from listBox after selecting it, if selected by mistake by the user !!!
Thanks !
Hi adarsha,
Close button in the ListBox is not available.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.