JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › custom values in grid drop-down
- This topic has 4 replies, 2 voices, and was last updated 2 years, 3 months ago by svetoslav_borislavov.
-
AuthorPosts
-
August 9, 2022 at 5:01 pm #103466edwardsmarkffParticipant
hello –
it appears all of the grid examples are using EXISTING data in the drop-down.
is there an example available of a grid drop-down that contains entirely custom values?
in my example here:
https://codepen.io/edwardsmarkf/pen/KKoeoZN
the dropdown contains four last names, but they already exist in the data. what if i want to have “Edwards” in the drop-down but it is not presently contained in the data?
grid looks totally awesome, and of course has the predictable learning curve!
August 9, 2022 at 9:28 pm #103467edwardsmarkffParticipantgot it:
https://codepen.io/edwardsmarkf/pen/KKoeoZN
this was MUCH more difficult than it should have been. maybe provide a website example?
const myDropDownValues = ['one', 'two','three', 'last']; . . { label: 'Last Name', dataField: 'lastName', template: '' , editor: { template: 'dropDownList' , dataSource: myDropDownValues } },
also, i never found anyplace where
editor
is described in the documentation – at least not specifically under ‘grid’.- This reply was modified 2 years, 3 months ago by edwardsmarkff.
- This reply was modified 2 years, 3 months ago by edwardsmarkff.
- This reply was modified 2 years, 3 months ago by edwardsmarkff.
- This reply was modified 2 years, 3 months ago by edwardsmarkff.
August 10, 2022 at 5:54 am #103472svetoslav_borislavovParticipantHi,
Thank you for the feedback!
You can read more about
editor
in the docs -> grid -> API -> columns (expand the columns) -> editor: editor
In case you can’t find it:editor: string | { template?: string, settings?: any, onInit?: any, onRender?: any, setValue?: any, getValue?: any}
Sets or gets the column's editor. The property expects 'input', 'autoComplete', 'comboBox', 'dropDownList', 'image', 'numberInput', 'checkBox', 'multiInput', 'multiComboInput', 'checkInput', 'slider', 'dateTimePicker', 'timeInput', 'dateInput', 'dateRangeInput', 'maskedTextBox', 'textArea' or a custom object with 'template' property which defines the editor type, 'settings' property which defines the custom editor's properties, 'onInit(int row, string column, object editor, object rowData): void', 'onRender(int row, string column, object editor, object rowData): void', 'setValue(object value): void' and 'getValue(object value): any' callback functions.
Here is a demo with it editor-demo
If you have any further questions, do not hesitate to contact us!
Best regards,
Svetoslav BorislavovjQWidgets Team
https://www.jqwidgets.com/August 11, 2022 at 4:02 pm #103488edwardsmarkffParticipantha ah – wow i cant believe i missed that!
hey, just a suggestion. i am your BIGGEST fan customer out there (but obviously far away from the smartest) and yet somehow i missed/overlooked the little arrow to get more information on a subject.
is the arrow next to the property/event/method too small? or am i just not very observant?? (please dont answer that….)
i have been using smart-elements for a couple of years now and i have never noticed this before. 😳😳😳😳😳😳😳
- This reply was modified 2 years, 3 months ago by edwardsmarkff.
August 12, 2022 at 11:57 am #103491svetoslav_borislavovParticipantHi,
We are so happy to hear that! Thank you for the feedback!
Best regards,
Svetoslav BorislavovjQWidgets Team
https://www.jqwidgets.com/ -
AuthorPosts
- You must be logged in to reply to this topic.