Dinkin Posted December 18, 2023 Share Posted December 18, 2023 Добрый день. Для копирования в память использую код Темы, но у меня может быть верстка css в ячейки, могу лия как то брать текст к примеру только до первого символа "<" ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 18, 2023 Share Posted December 18, 2023 Добрый день, Можете дать пример текста, и ту часть которую Вы хотите скопировать? Quote Link to comment Share on other sites More sharing options...
Dinkin Posted December 18, 2023 Author Share Posted December 18, 2023 Тестовый проект 3<img src="files\Images\edit.png" style="float:right"> И вот взять все до первого сиволапа "<" Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 18, 2023 Share Posted December 18, 2023 10 minutes ago, Dinkin said: И вот взять все до первого сиволапа "<" Ok. Попробуйте так: function cellclick(sender, td, cellIndex, record, tr, rowIndex, e, eOpts) { var el = Ext.get(td).select('.x-grid-cell-inner').elements[0]; if (el) { //sender.grid.selectedValue = el.innerHTML sender.grid.selectedValue = el.innerText } } 1 Quote Link to comment Share on other sites More sharing options...
Dinkin Posted December 18, 2023 Author Share Posted December 18, 2023 Спасибо 1 Quote Link to comment Share on other sites More sharing options...
Dinkin Posted December 18, 2023 Author Share Posted December 18, 2023 Еще раз доброго. Заметил такой момент, если на форме две таблицы, в каждой прописать событие function afterrender(sender, eOpts) { var mapCopy = new Ext.util.KeyMap({ target: sender.getView().getEl(), key: 67, ctrl: true, handler: function() { if (sender.selectedValue) { const el = document.createElement('textarea'); el.value = sender.selectedValue; document.body.appendChild(el); el.select(); document.execCommand('copy'); document.body.removeChild(el); } }, scope: sender }); } то сайт не погружается Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 18, 2023 Share Posted December 18, 2023 5 minutes ago, Dinkin said: то сайт не погружается В консоли браузера есть ошибки !? Quote Link to comment Share on other sites More sharing options...
Dinkin Posted December 18, 2023 Author Share Posted December 18, 2023 Ага Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 18, 2023 Share Posted December 18, 2023 12 minutes ago, Dinkin said: то сайт не погружается Я не смог воспроизвести. Quote Link to comment Share on other sites More sharing options...
Dinkin Posted December 18, 2023 Author Share Posted December 18, 2023 Just now, Sherzod said: Я не смог воспроизвести Может потому что на у меня все на фрейме (не знаю почему написал выше что на форме две таблицы). Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 18, 2023 Share Posted December 18, 2023 Just now, Dinkin said: Скорее всего проблема тут в другом. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 18, 2023 Share Posted December 18, 2023 16 minutes ago, Dinkin said: function afterrender(sender, eOpts) Вы уверены что используете именно это событие !? Quote Link to comment Share on other sites More sharing options...
Dinkin Posted December 18, 2023 Author Share Posted December 18, 2023 Вроде да. Как только в одной из таблиц очищаю событие, сайт грузится, а так пустая страница. (В низу заголовок не видно, но там другая таблица ) Quote Link to comment Share on other sites More sharing options...
Dinkin Posted December 18, 2023 Author Share Posted December 18, 2023 аа, ну и там видно что в первом скрине таблица, во втором дерево. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 18, 2023 Share Posted December 18, 2023 11 minutes ago, Dinkin said: аа, ну и там видно что в первом скрине таблица, во втором дерево. TreeGrid? Quote Link to comment Share on other sites More sharing options...
Dinkin Posted December 18, 2023 Author Share Posted December 18, 2023 4 minutes ago, Sherzod said: TreeGrid? Ага Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 18, 2023 Share Posted December 18, 2023 2 minutes ago, Dinkin said: Ага Я не смог воспроизвести 😐 Quote Link to comment Share on other sites More sharing options...
Dinkin Posted December 18, 2023 Author Share Posted December 18, 2023 Да что ж мне так везет 😐 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 18, 2023 Share Posted December 18, 2023 1 minute ago, Dinkin said: Да что ж мне так везет 😐 Все норм, я уверен у Вас другой случай. Когда загружаете данные? Quote Link to comment Share on other sites More sharing options...
Dinkin Posted December 18, 2023 Author Share Posted December 18, 2023 9 minutes ago, Sherzod said: Когда загружаете данные? У меня на всю главную форму лежит TUniPageControl. И при создании вкладки на нем, есть фрейм с двумя таблицами. Сейчас отключил прогруз всех данных, оставил только создание вкладок. Так сайт открывается полностью пустой, без единого компонента, Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 18, 2023 Share Posted December 18, 2023 Можете создать простой тестовый случай !? Quote Link to comment Share on other sites More sharing options...
Dinkin Posted December 18, 2023 Author Share Posted December 18, 2023 Я попробую по одному кидать компоненты и связывать и скинуть Вам пример на том моменте когда все заглохнет. 1 Quote Link to comment Share on other sites More sharing options...
Dinkin Posted December 18, 2023 Author Share Posted December 18, 2023 Весь день тестил, и заметил что дело в настройках DBTreeGrid. Достаточно просто оставить пустое значение в событии afterrender. И уже работать не будет. Прикрепил тестовый проект. На главной форме лежит TUniPageControl с одной вкладкой, при старте на вкладке создается фрейм с таблицей, и все. Application.7z Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 18, 2023 Share Posted December 18, 2023 Спасибо, попробую проанализировать Ваш случай чуть позже. 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 19, 2023 Share Posted December 19, 2023 15 hours ago, Dinkin said: Application.7z 13.12 MB · 0 downloads Добрый день, Хмм, тестовый случай же на cpp. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.