【问题标题】:JqWidgets - Applying a theme to a jqxgridJqWidgets - 将主题应用于 jqxgrid
【发布时间】:2017-06-16 23:49:19
【问题描述】:

在 Angular 中,我正在尝试将主题应用于我的网格。

我的网格

          <div class="panel-body">
            <jqxGrid #reference 
              [width]='1505' [source]='dataAdapter' [pageable]='true' [height]='500'
              [editable]='true' [columns]='columns'>
           </jqxGrid>

          </div>    

在 jqwidgets 文件夹中,有一个主题我想用于 jqx.energyblue.css 中的表格

我不确定如何在我创建的网格中调用它。我是新来的。非常感谢任何帮助。

更新***

我可能已经取得了一些进展。在 index.html 中,我能够设置主题属性。

  <link href="assets/css/jqx.base.css" rel="stylesheet">
  <link href="assets/css/jqx.energyblue.css" rel="stylesheet">
  <script type="text/javascript">
        $(document).ready(function () {
            // Set the theme.
            $("#jqxTheme").jqxGrid({ theme: "energyblue" });
        });
    </script>

然后对网格本身进行更改。

              <div class="panel-body">
                <jqxGrid id='jqxTheme'
                  [width]='1505' [source]='dataAdapter' [pageable]='true' [height]='500'
                  [editable]='true' [columns]='columns'>
               </jqxGrid>

              </div>

还是不行。有什么想法吗?

【问题讨论】:

  • 我取得了一些进展,但仍然没有成功。差不多好了。变化如上图所示。
  • 控制台中的错误读取为。 1)ReferencError: $ is not defined 2)Bootstrap的JavaScript需要jQuery

标签: html css angularjs jqxgrid jqwidget


【解决方案1】:

知道了。将 css 主题的名称应用到您的 jqxGrid

   <jqxGrid
      [width]='1505' [source]='dataAdapter' [pageable]='true' [height]='500'
      [editable]='true' [columns]='columns' [theme]='"energyblue"'>
   </jqxGrid>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多