Jump to content

Stylization UniDBGrid


artem_niko

Recommended Posts

Hello!

I use last version on UniGUI (...1515) Professional.

I have some question about this component:

1. How change width in first column where RowNumbers?

image.png.762e0f976201e31876add98583264446.png

2. How create title like on my screenshot? I want remove lines in title, but UniDBGrid don't have this property. Just RowLines and ColLines. I want remove in title too.

I want title like that (I created him in MS Paint :)):

image.png.18d01518796b8008c5a008f14c8d01e3.png

Link to comment
Share on other sites

Hello,

23 minutes ago, Артем said:

1. How change width in first column where RowNumbers?

One possible solution:

UniDBGrid -> ClientEvents -> ExtEvents -> 

function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts)
{
    if (columns[0].xtype && columns[0].xtype == 'rownumberer') {
        columns[0].width = 100;
    }
}

 

Link to comment
Share on other sites

17 minutes ago, Sherzod said:

Hello,

One possible solution:

UniDBGrid -> ClientEvents -> ExtEvents -> 


function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts)
{
    if (columns[0].xtype && columns[0].xtype == 'rownumberer') {
        columns[0].width = 100;
    }
}

 

Hm...not work:

 

function reconfigure(sender, store, columns, oldStore, the, eOpts)
{
  if (columns[0].xtype && columns[0].xtype == 'rownumberer') {
        columns[0].width = 70;
    }
    Ext.each(columns, 
     function(column, index) {
        if (!sender.columnManager) {
          sender.columns[index].flex=1;  /*fit width, comment to disable*/
          sender.columns[index].minWidth = 150; /*min.size*/
        } else {
          sender.columnManager.columns[index].flex=1; 
          sender.columnManager.columns[index].minWidth = 75; 
        };        
     }
  )
}

 

Link to comment
Share on other sites

5 minutes ago, Sherzod said:

Then please:

 

Is it about?

2. How create title like on my screenshot? I want remove lines in title, but UniDBGrid don't have this property. Just RowLines and ColLines. I want remove in title too.

I want title like that (I created him in MS Paint :)):

image.png.18d01518796b8008c5a008f14c8d01e3.png

Link to comment
Share on other sites

32 minutes ago, Артем said:

Well... The second question mostly important for me. I will be say, that second question have more priority for me) 

One possible solution by using CustomCSS.

UniServerModule.CustomCSS:

.customHeader .x-group-sub-header, 
.customHeader .x-column-header {
   border: none;
}

UniDBGrid.LayoutConfig.Cls = customHeader

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