Jump to content

How to change tunidbgrid font of column row number?


newsanti

Recommended Posts

1 hour ago, newsanti said:

for writing special components.

Well,

1. CustomCSS ->

.customGrid .x-grid-cell-row-numberer {
  font-weight: bold;
  font-size: 14px;
  font-family: cursive, "Times New Roman", Times, serif;
}

2. OnCreate or when created dynamically ->

UniDBGrid.JSInterface.JSConfig('cls', ['customGrid']);

 

  • Thanks 1
Link to comment
Share on other sites

8 hours ago, Sherzod said:

Well,

1. CustomCSS ->

.customGrid .x-grid-cell-row-numberer {
  font-weight: bold;
  font-size: 14px;
  font-family: cursive, "Times New Roman", Times, serif;
}

2. OnCreate or when created dynamically ->

UniDBGrid.JSInterface.JSConfig('cls', ['customGrid']);

 

image.png.10838470e7defa445f04125d96286c39.png

  oList.Add('.customGridHeader .x-column-header{');
  oList.Add('    line-height: normal;');
  oList.Add('    vertical-align: middle;');
  oList.Add('}');

  oList.Add('.customGridTitle .x-title-text{');
  oList.Add('    line-height: normal;');
  oList.Add('    vertical-align: middle;');
  oList.Add('}');

  oList.Add('.customGridBody .x-grid-td .x-grid-cell-inner {');
  oList.Add('    line-height: normal;');
  oList.Add('    vertical-align: middle;');
  oList.Add('    text-overflow: ellipsis;');
  oList.Add('    overflow: hidden;');
  oList.Add('}');

How to combine .x-grid-cell-row-number css with above css,
or coding js at runtime with dbgrid jsInterface? 

Link to comment
Share on other sites

8 hours ago, Sherzod said:

Well,

1. CustomCSS ->

.customGrid .x-grid-cell-row-numberer {
  font-weight: bold;
  font-size: 14px;
  font-family: cursive, "Times New Roman", Times, serif;
}

2. OnCreate or when created dynamically ->

UniDBGrid.JSInterface.JSConfig('cls', ['customGrid']);

 

Can setting cls = 'customGrid1;customGrid2; customGrid3'?

Link to comment
Share on other sites

9 minutes ago, Sherzod said:

How do you understand this? I don't quite understand.

.customGrid1 .x-column-header{
   line-height: normal;
  vertical-align: middle;
  }
.customGrid2 .x-title-text{

  line-height: normal;
  vertical-align: middle;
  }

.customGrid3 .x-grid-td .x-grid-cell-inner {
  line-height: normal;
  vertical-align: middle;
  text-overflow: ellipsis;
  overflow: hidden;
  }

.customGrid4 .x-grid-cell-row-numberer {
  font-weight: bold;
  font-size: 14px;
  font-family: cursive, "Times New Roman", Times, serif;
}

Is possible to combine multiple css with LayoutConfig.Cls 
Example: dbGrid.LayoutConfig.cls := 'customGrid1;customGrid2; customGrid3;customGrid4';

Link to comment
Share on other sites

But what's stopping you from using one class?

.customGrid .x-column-header{
   line-height: normal;
  vertical-align: middle;
  }
.customGrid .x-title-text{
  line-height: normal;
  vertical-align: middle;
  }

.customGrid .x-grid-td .x-grid-cell-inner {
  line-height: normal;
  vertical-align: middle;
  text-overflow: ellipsis;
  overflow: hidden;
  }

 

Link to comment
Share on other sites

45 minutes ago, Sherzod said:

But what's stopping you from using one class?

.customGrid .x-column-header{
   line-height: normal;
  vertical-align: middle;
  }
.customGrid .x-title-text{
  line-height: normal;
  vertical-align: middle;
  }

.customGrid .x-grid-td .x-grid-cell-inner {
  line-height: normal;
  vertical-align: middle;
  text-overflow: ellipsis;
  overflow: hidden;
  }

 

customGrid3 .x-grid-td .x-grid-cell-inner {
  line-height: normal;
  vertical-align: middle;
  text-overflow: ellipsis;
  overflow: hidden;
  }
.customGrid1 .x-column-header{

   line-height: normal;
  vertical-align: middle;
 } 
if combine above (customCSSGrid1&customCSSGrid3)  customCSSGrid3 display incorrect.

customCSSGrid4 .x-grid-cell-row-numberer {
  font-weight: bold;
  font-size: 14px;
  font-family: cursive, "Times New Roman", Times, serif;
}

Need other customCSSGrid4 to customize grid row number.

2023-09-12_01-55-52.png

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