@edwardsmarkff
@edwardsmarkff
Forum Replies Created
-
AuthorPosts
-
edwardsmarkffParticipant
scratch question please — when i try to use grid inside a smart-window, the delete button stops working.
i am going to tey using a “delete?” checkbox column instead, where if the column gets checked, the row will be deleted.
edwardsmarkffParticipantor another dumb question: would it be possible perhaps in a future release to also include the deleted row with the onRowRemoved() callback ??
edwardsmarkffParticipant<span style=”text-decoration: underline;”>thank you very much.</span>
https://codepen.io/edwardsmarkf/pen/LYdqxWP 😁
i should think this would be necessary enough to require its own unique event: “onRowRemoving()” .
- This reply was modified 2 years, 2 months ago by edwardsmarkff.
- This reply was modified 2 years, 2 months ago by edwardsmarkff.
edwardsmarkffParticipantis it possible to get the data contained in the row? the function onRowRemoved() appears to lose the data.
so this does not seem to work for me:
https://codepen.io/edwardsmarkf/pen/JjLwzGQ
or does require a new function “onRowRemoving()” dedicated to me? 😂🤣😂🤣
- This reply was modified 2 years, 2 months ago by edwardsmarkff.
edwardsmarkffParticipantthis did not work:
for ( const [key, value] in document.getElementsByClassName('smart-icon-delete') ) { let thisVal = document.getElementsByClassName('smart-icon-delete')[key] ; . . . . console.log(thisVal); . . . . console.log (typeof thisVal) ; . . . . thisVal.addEventListener('click', (event) => { console.table(event); } ) }
- This reply was modified 2 years, 2 months ago by edwardsmarkff.
- This reply was modified 2 years, 2 months ago by edwardsmarkff.
edwardsmarkffParticipanthere is what i mean:
https://www.htmlelements.com/demos/grid/editing-dialog/
https://codepen.io/edwardsmarkf/pen/KKobVwj
i need to be able to determine which row was deleted by a jScript event.
- This reply was modified 2 years, 2 months ago by edwardsmarkff.
edwardsmarkffParticipantthank you! its a mystery how i could have missed it.
can the textArea and dialog be combined somehow??
like this: https://codepen.io/edwardsmarkf/pen/dymQbyL
- This reply was modified 2 years, 3 months ago by edwardsmarkff.
edwardsmarkffParticipantha 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.
edwardsmarkffParticipantgot 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.
edwardsmarkffParticipantdisregard last message please – i am going to try to see if i can get a “count” first and then try out your EXCELLENT RECOMMENDATION of using the “smart-input” instead of “smart-combo-box” when there are no line items.
thank you.
- This reply was modified 2 years, 6 months ago by edwardsmarkff.
- This reply was modified 2 years, 6 months ago by edwardsmarkff.
edwardsmarkffParticipanthi Peter – thank you for your reply.
the issue i am facing is that i am creating <span style=”text-decoration: underline;”>dynamic</span> ComboBox elements from a data source, and it is very difficult to determine ahead of time if there are going to be list items or not.
i set up an example here of what i am thinking: https://codepen.io/edwardsmarkf/pen/poayPbg
for ( let tmp in document.getElementsByTagName(‘smart-combo-box’) ) {
. . . if (!isNaN(parseInt(tmp))) {
. . . . . . . . let comboBox = document.getElementsByTagName(‘smart-combo-box’)[tmp] ;
. . . . . . . . if ( !comboBox.items.length) {
. . . . . . . . . . . . comboBox.getElementsByClassName(‘smart-drop-down-button’)[0].style.setProperty(‘display’ , ‘none’ );
. . . . . . . . . . . . // HIDE the drop-down arrows if there are no items to select
. . . . . . . . }
. . . . }
}edwardsmarkffParticipantplease try both of these, just enter “a” and return in both comboBoxes:
https://codepen.io/edwardsmarkf/pen/rNpExgO
auto-complete="none"
does not seem to do anything since it still finds “Affrogato” butincremental-search-mode='equals'
seems to work fine.please let me know if i am not understanding what auto-complete does. i just assumed that saying “none” would just turn it off completely…?
- This reply was modified 2 years, 6 months ago by edwardsmarkff.
- This reply was modified 2 years, 6 months ago by edwardsmarkff.
edwardsmarkffParticipantactually that is not quite true – again please, try entering just the letter “a” and hit the return key, it fills in with the coffee name “Affrogato” – i had hoped to suppress the auto-fill completely.
however i did find an easy workaround:
incremental-search-mode='equals'
creates the desired behavior.edwardsmarkffParticipant>>> “Only as a temporary workaround such code could be used.”
does this mean the option may become available?
- This reply was modified 2 years, 6 months ago by edwardsmarkff.
edwardsmarkffParticipantok thanks – is this the best way to limit the number of characters in a combo-box?
https://codepen.io/edwardsmarkf/pen/mdpogEL
window.onload = () => {
. . for ( let results in document.getElementById(“my-smart-combo-box”).getElementsByTagName(‘INPUT’) )
. . {
. . . . let tmp = document.getElementById(“my-smart-combo-box”).getElementsByTagName(‘INPUT’)[results] ;
. . . . if ( (typeof tmp == ‘object’) && tmp.getAttribute(‘class’) == ‘smart-input’)
. . . . {
. . . . . . . . tmp.setAttribute(‘maxlength’, ‘3’);
. . . . . . . . break;
. . . . }
. . }
}- This reply was modified 2 years, 6 months ago by edwardsmarkff.
- This reply was modified 2 years, 6 months ago by edwardsmarkff.
-
AuthorPosts