Jump to content

How can i add visible Column Numbers in TUniDBGrid caption??


rgreat

Recommended Posts

1 hour ago, Sherzod said:

We will try to analyze.

Thank you.

Also i use this code to make captions to look good:

  UniSession.SetStyle('.myCpt{word-wrap: break-word; white-space: pre-line;}');

  for i:=0 to DBG1.Columns.Count-1 do begin
    DBG1.Columns[i].Title.Caption:='<span class="myCpt">'+DBG1.Columns[i].Title.Caption+'</span>';
  end;

And maybe that's not the best way to make caption word wrap.

Link to comment
Share on other sites

26 minutes ago, rgreat said:

Also i use this code to make captions to look good...

Can you check this approach?

var
  I: integer;
begin
  UniSession.SetStyle('.myCpt{word-wrap: break-word; white-space: pre-line;}');
  UniSession.SetStyle('#'+ dd.JSId +' .x-column-header-text-wrapper{vertical-align: bottom; text-align: center;}');
  for I:=0 to dd.Columns.Count-1 do begin
    dd.Columns[i].Title.Caption:='<span class="myCpt">'+dd.Columns[i].Title.Caption+'</span><span><br><br>'+ IntToStr(I+1) +'</span>';
  end;
end;

 

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...