Jump to content

DBGrid


Kalvaitir

Recommended Posts

Olá, pessoal!

 

Estou usando o dbgrid e quando clico na célula para editar, observei que ele não vem selecionado o conteúdo para editar, o cursor vem no final do texto, será que teria como vim com o texto selecionado?

 

Olá Kalvaitir.

 

(Traduzido por Traduz Google)

 

Se eu entendi a pergunta.

 

1. Se você não usar "columns.editor", então você pode:

 

UniDBGrid1 -> ClientEvents -> ExtEvents -> adicionar reconfigure:

function reconfigure(sender, store, columns, oldStore, the, eOpts)
{
  columns[1].editor = {selectOnFocus: true};    
  
  // for all columns
  for (var i = 0; i < columns.length; i++) {
    columns[i].editor = {selectOnFocus: true};
  }
}

2. Se você usar "columns.editor", então você pode:

 

Por exemplo, as columns [1].editor = UniEdit1;

 

UniEdit1 -> ClientEvents -> ExtEvents -> adicionar focus:

function focus(sender, the, eOpts)
{
  sender.selectText()
}

Experimente...

 

Atenciosamente.

  • Upvote 2
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...