jQWidgets Forums

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts

  • vtavakkoli
    Member

    Thanks it is solved


    vtavakkoli
    Member

    Hi Peter,
    Thanks yes it is mistake in here not in original as I remove additional fields,
    I will try provide better sample with php code .
    regards,
    Vahid


    vtavakkoli
    Member

    Hi,
    I’m using version 2.6 , changing code to version 2.8 version has problems as in newer version tree structure is not working like previous versions.Also I create sample code from your source as my original code is much larger than this one.
    Anyway I download you latest plugin code 2.8 with following changes and it is not working :

        <link rel="stylesheet" href="./js/jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="./js/jquery.min.js"></script>
    <script type="text/javascript" src="./js/jqwidgets-ver2.8/jqwidgets/jqx-all.js"></script>
    <script type="text/javascript" src="./js/seso_ui_functions.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    var theme = getDemoTheme();

    may be the problem is null values in json data .
    with best regards,
    Vahid


    vtavakkoli
    Member

    Thanks for reply 🙂
    but it is not working
    same error happened . please see following example,
    without grouping code is working fine.also if you enable grouping without default group “groups: [‘Category’]” error will not happened.
    with best regards,
    Vahid
    Error message :ncaught TypeError: Cannot read property ‘cellsformat’ of null

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <link rel="stylesheet" href="./js/jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="./js/jquery.min.js"></script>
    <script type="text/javascript" src="./js/jqwidgets/jqx-all.js"></script>
    <script type="text/javascript" src="./js/seso_ui_functions.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    var theme = getTheme();
    var source_eve = {
    datatype : "json",
    datafields : [ {
    name : 'EventId',
    type:'number'
    }, {
    name : 'Category',
    type:'string'
    }, {
    name : 'State',
    type:'string'
    }, {
    name : 'Description',
    type:'string'
    }],
    id:'EventId',
    url : 'ajax/events.php?info=vulscan'
    };
    var dataAdapter_eve = new $.jqx.dataAdapter(source_eve);
    $('#event-table').jqxGrid({
    width : 600,
    source : dataAdapter_eve,
    theme : theme,
    groupable: true,
    columns : [ {
    text : 'State',
    datafield : 'State',
    width : '30%'
    }, {
    text : 'Description',
    datafield : 'Description',
    width : '50%'
    } , {
    text : 'Category',
    datafield : 'Category',
    width : '20%'
    } ],
    groups: ['Source']
    });
    var source_log = {
    datatype : "json",
    datafields : [ {
    name : 'EventId',
    type:'number'
    }, {
    name : 'Category',
    type:'string'
    }, {
    name : 'State',
    type:'string'
    }, {
    name : 'Description',
    type:'string'
    }],
    id:'EventId',
    url : 'ajax/events.php?info=victims'
    };
    var dataAdapter_log = new $.jqx.dataAdapter(source_log);
    $('#log-table').jqxGrid({
    width : 600,
    source : dataAdapter_log,
    theme : theme,
    groupable: true,
    columns : [ {
    text : 'State',
    datafield : 'State',
    width : '30%'
    }, {
    text : 'Description',
    datafield : 'Description',
    width : '50%'
    } , {
    text : 'Category',
    datafield : 'Category',
    width : '20%'
    } ],
    groups: ['Category']
    });
    });
    </script>
    </head>
    <body class='default'>
    <div id='jqxWidget' style="font-size: 13px; font-family: Verdana; float: left;">
    <div id="event-table">
    </div>
    <div id="log-table">
    </div>
    </div>
    </body>
    </html>

    vtavakkoli
    Member

    sample code

    					<div id='Tabs' class='jqx-rc-all' style="border: none;">
    <ul id="unorderedList">
    <li style="margin-left: 40px;" >
    <div>
    <div class="tabHeader">
    <b><span class="tr-events">Events</span></b>
    </div>
    </div>
    </li>
    <li style="margin-left: 40px;" >
    <div>
    <div class="tabHeader">
    <b><span class="tr-logs">Logs</span></b>
    </div>
    </div>
    </li>
    </ul>
    <div class="advisor-tab ui-body-d">
    <div id="table1">table1</div>
    </div>
    <div class="advisor-tab ui-body-d">
    <div id="table2">table2</div>
    </div>
    </div>
Viewing 5 posts - 1 through 5 (of 5 total)