jQWidgets Forums

Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • in reply to: Checkbox Column Checkbox Column #86566

    mohammad
    Participant

    hi,

    No i don’t have editable: true in grid props

    in reply to: Checkbox Column Checkbox Column #86455

    mohammad
    Participant

    hi,

    After adding editable:false also i’m not able to Check/Uncheck column “Consolidate”

            var source = {
                    datatype: "json",
                    datafields: 
                    [
    					{name: 'Sel',type: 'bool'},
                    	{name: 'Code',type: 'string'}, 
                    	{name: 'CoName',type: 'string'}
                    ],
                    id: 'CId',
                    url: '\GetComp',
                    async: true
                };
           	
           	
                var dataAdapter = new $.jqx.dataAdapter(source);
                $("#jqxgrid").jqxGrid({theme:'light',
                    width: 780,
                    height: 290,
                    source: dataAdapter,
                    columns: 
                    [
    				 {text: 'Consolidate',editable: true, columntype: 'checkbox', datafield: 'Sel', width: 90},
                     {text: 'Code',editable: false,datafield: 'Code',width: 50}, 
                     {text: 'Company Name',editable: false,datafield: 'CoName',width: 600}
                    ]
                });
    in reply to: Output as JSON Output as JSON #85492

    mohammad
    Participant

    hi Hristo,

    Still its showing wrong result! Please check once before giving the solution.

    in reply to: Output as JSON Output as JSON #85463

    mohammad
    Participant

    Dear Hristo,

    It shows “true” for all nodes though it has child or not, Please check…

    Thanks in advance…

    Regards,
    Mohammad

    in reply to: Output as JSON Output as JSON #85436

    mohammad
    Participant

    Thanks Hristo for your help…Do we have any property/Method to find out its a Group or a Leaf?

    in reply to: Output as JSON Output as JSON #85419

    mohammad
    Participant

    hi,

    I’m not able to get all the elements as JSON i.e(parentid and whether its a Group/Leaf)?

    
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    
    <html lang="en">
    <head>
        <title id='Description'>In this demo the jqxTree is built from JSON data.</title>
        <link rel="stylesheet" href="jqwidgets/styles/jqx.base.css" type="text/css" />
        <link type="text/css" rel="stylesheet" href="jqwidgets/styles/jqx.light.css" />
        <script type="text/javascript" src="scripts/jquery-1.11.1.min.js"></script>
        <script type="text/javascript" src="scripts/demos.js"></script>
        <script type="text/javascript" src="jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="jqwidgets/jqxdata.js"></script>
        <script type="text/javascript" src="jqwidgets/jqxscrollbar.js"></script>
        <script type="text/javascript" src="jqwidgets/jqxpanel.js"></script>
        <script type="text/javascript" src="jqwidgets/jqxtree.js"></script>
        <script type="text/javascript" src="jqwidgets/jqxbuttons.js"></script>
        
                <script type="text/javascript">
                $(document).ready(function () {
                	
                    var data = [
                                { "id": "2",
                                    "parentid": "1",
                                    "text": "Hot Chocolate",
                                    "value": "$2.3"
                                }, {
                                    "id": "3",
                                    "parentid": "1",
                                    "text": "Peppermint Hot Chocolate",
                                    "value": "$2.3"
                                }, {
                                    "id": "4",
                                    "parentid": "1",
                                    "text": "Salted Caramel Hot Chocolate",
                                    "value": "$2.3"
                                }, {
                                    "id": "5",
                                    "parentid": "1",
                                    "text": "White Hot Chocolate",
                                    "value": "$2.3"
                                }, {
                                    "text": "Chocolate Beverage",
                                    "id": "1",
                                    "parentid": "-1",
                                    "value": "$2.3"
                            }, {
                                    "id": "6",
                                    "text": "Espresso Beverage",
                                    "parentid": "-1",
                                    "value": "$2.3"
                                }, {
                                    "id": "7",
                                    "parentid": "6",
                                    "text": "Caffe Americano",
                                    "value": "$2.3"
                                    }, {
                                    "id": "8",
                                    "text": "Caffe Latte",
                                    "parentid": "6",
                                    "value": "$2.3"
                                }, {
                                    "id": "9",
                                    "text": "Caffe Mocha",
                                    "parentid": "6",
                                    "value": "$2.3"
                                    }, {
                                    "id": "10",
                                    "text": "Cappuccino",
                                    "parentid": "6",
                                    "value": "$2.3"
                                }, {
                                    "id": "11",
                                    "text": "Pumpkin Spice Latte",
                                    "parentid": "6",
                                    "value": "$2.3"
                                    }, {
                                    "id": "12",
                                    "text": "Frappuccino",
                                    "parentid": "-1"
                                }, {
                                    "id": "13",
                                    "text": "Caffe Vanilla Frappuccino",
                                    "parentid": "12",
                                    "value": "$2.3"
                                    }, {
                                    "id": "15",
                                    "text": "450 calories",
                                    "parentid": "13",
                                    "value": "$2.3"
                                }, {
                                    "id": "16",
                                    "text": "16g fat",
                                    "parentid": "13",
                                    "value": "$2.3"
                                    }, {
                                    "id": "17",
                                    "text": "13g protein",
                                    "parentid": "13",
                                    "value": "$2.3"
                                }, {
                                    "id": "14",
                                    "text": "Caffe Vanilla Frappuccino Light",
                                    "parentid": "12",
                                    "value": "$2.3"
                                    }]
                                var source =
                                {
                                    datatype: "json",
                                    datafields: [
                                        { name: 'id' },
                                        { name: 'parentid' },
                                        { name: 'text' },
                                        { name: 'value' }
                                    ],
                                    id: 'id',
                                    localdata: data
                                };
                                var dataAdapter = new $.jqx.dataAdapter(source);
                                dataAdapter.dataBind();
                                var records = dataAdapter.getRecordsHierarchy('id', 'parentid', 'items', [{ name: 'text', map: 'label'}]);
    
                    $('#jqxWidget').jqxTree({ source: records, width: '300px',height: '200px',theme:'light'});
                    $("#Test").jqxButton({theme:'light', template: "info",width: '150', height: '35px' });
            	  	$( "#Test" ).click(function() {
            	         var items = $('#jqxWidget').jqxTree('getItems');
            	         for (var i = 0; i < items.length; i++) {
            	             var item = items[i];
            	             alert(JSON.stringify({id: item.id, text: item.label, pid: item.parentid}));
            	         }
            	 	});
                    
                    
                });
               
           
            </script>
        
        
    </head>
    <body class='default'>
            <div id='jqxWidget'></div>
    <br/>
            <input type="button" value="Get JSON" id="Test" />
    </body>
    </html>
    

    Thanks in advance…

    Regards,
    MZH

    in reply to: Expanding! Expanding! #85302

    mohammad
    Participant

    hi Cristopher,
    Thanks for your instant support…
    You mean i have to set “height: 200” property with some value? If yes, then what if i have 1000s of rows?

    in reply to: Grid Grid #77903

    mohammad
    Participant

    hi Dimitar,

    Appreciate if you could access my system thru Ammyy/Teamviewer.
    Please let me know so, that i can give you access details.

    Waiting for your reply…Thanks in advance….

    in reply to: Grid Grid #77895

    mohammad
    Participant

    hi Dimitar,

    I followed tutorial without missing anything. Yes, i’m running files on the server(Apache Tomcat)
    As per jqwidgets’s Grid demo there are two files 1) select-data.jsp 2) HTML file

    1) In select-data.jsp is displaying data in resultSet as a JSON array format.
    2) In HTML file it is just showing empty grid with column names without any rows in it. I guess some binding issue in the code.

    in reply to: Grid Grid #77892

    mohammad
    Participant

    hi Dimitar,

    There no errors but grid is totally empty.

    select-data.jsp file is displaying data, but in HTML page grid is empty zero rows.

Viewing 10 posts - 1 through 10 (of 10 total)