Jump to content

Перенос слов и высота строк в TUnimDBGrid


x11

Recommended Posts

С помощью CustomCSS + config я нашел на форуме, как увеличить высоту строки TUnimDBGrid:

http://forums.unigui.com/index.php?/topic/13329-change-rowheight-in-unimdbgrid/

UnimDBGrid.ClientEvents.UniEvents:

function beforeInit(sender, config)
{
  config.itemConfig = {
        height: 70
    };
}

 

CustomCSS:

.x-big .x-gridcell {
    line-height: 0;
    word-wrap: break-word;
    white-space: pre-wrap;
}

а вот перенос слов не получается реализовать

Screenshot_67.jpg

Link to comment
Share on other sites

4 hours ago, x11 said:

а вот перенос слов не получается реализовать

Добрый вечер,

Попробуйте такое решение:

1. UnimDBGrid -> LayoutConfig -> Cls = customItem

2. CustomCSS ->

.customItem .x-gridcell-body-el {
  white-space: normal;   
}

 

  • Like 1
Link to comment
Share on other sites

Спасибо. Помогло.

Еще хочу вернуться к вопросу о высоте строк. Можно ли высоту записей сетки сделать автоматической?

Т.е. подогнать к количеству строк текста. Вот, например, взять компоненту unimDBLookupCombobox (картинка 2) - в выпадающем списке некоторые строки двойной высоты, чтобы уместился весь текст записи и это очень удобно.

Screenshot_1.jpg

Screenshot_2.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...