I have a datasource which contains a status column. I also have an array, PART_STATUS, which contains all the possible statuses.
Is it possible to display a dropdown menu in that column with all the PART_STATUS statuses and have the correct option be selected?
Hello John,
Yes, it is possible to have a dropdown menu in the STATUS column of your sample. How it would work is to have Updating feature enabled with column editor type for that specific column set to combo.
I have attached a modified version of your sample with Updating feature set and defined all other columns except the STATUS column to be read only so it resembles the previous look. Of course you can change that based on your goals.
Note: For the drop down menu to be shown you will need to click first on the desired cell so that you enter edit mode for the cell.Also since Updating with editMode option set to "cell" doesn't display the Done/Cancel buttons, if you want them to be displayed editMode needs to be set to "row".
Let me know if you have further questions regarding this subject.
Best Regards,Svetoslav KrastevInfragistics, Inc.
This is almost perfect, except that the column STATUS does not look like a dropdown so the user does not know that they can select other options. Bonus: Any way to color the values and italicize them in the dropdown?!
I assume you need the dropdowns to be visible at all times for all columns. I've attached another sample that I hope would address your concerns.
For the dropdowns to be all visible what would be needed to do is to create a different combo on each row in the Status column after all rows are rendered. That would need creating a template for the Status column and define the default combo placeholder that will be used in each rown in the rowsRendered event.
I've changed the combo itemTemplate option, the combo events create and selectionChanged, as well as the PART_STATUS data source so custom coloring could work.
Let me know if you have any further questions regarding this subject or the sample itself.
This looks good, however, I notice one problem. I am not able to add checkboxes to your grid, select the rows and then display the selected rows onclick from a button.
I modified and uploaded your sample. After adding checkboxes, I need to let the user select rows then click the "Get Selected Rows" button which should return the new values selected in the dropodowns along with the other data in the row.
It seems like the resources needed for the Selection and RowSelectors features aren't added in the loader. That's why it is throwing an error and these features won't be available otherwise.
You could update the resources of the $.ig.loader with the following: resources: "igGrid.Paging.Updating.Selection.RowSelectors,igCombo"
or simply load all resources for igGrid: resources: "igGrid.*,igCombo" Best Regards,Svetoslav KrastevInfragistics, Inc.