jQWidgets Forums

jQuery UI Widgets Forums Grid Custom Selection not working for me

Tagged: ,

This topic contains 5 replies, has 3 voices, and was last updated by  hadaad 12 years, 4 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Custom Selection not working for me #14954

    basumrinmoy
    Participant

    I have a grid with checkbox in first column and I am follow your example custom Selection. But when make property editable: true then before grid populating showing Please add reference to the following modules : jqxgrid.edit.js . But I already have this script reference and the other all script reference require to populate grid. Please help me in urgent.

    Custom Selection not working for me #14955

    Peter Stoev
    Keymaster

    Hi basumrinmoy,

    In case you did not added the required files, a message will pop up by design. There is no issue with that behavior. In addition, in the custom row selection sample, the Grid is already editable.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Custom Selection not working for me #14983

    basumrinmoy
    Participant

    Thank you for your reply.But I have added all require files . But i use the free version or non commercial version. Is there any problem for using free version? I can’t find any problem from my side . Please help me how i can find checkbox column in grid and select any row using checkbox.

    Custom Selection not working for me #14984

    Peter Stoev
    Keymaster

    Hi basumrinmoy,

    I suggest you to download the working sample and use it as a start. I also suggest you to take a look at the help documentation available online. If the required files are not included, the Grid will not be displayed. This is not related to which version you have downloaded.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Custom Selection not working for me #16398

    hadaad
    Member

    I’m having the same issue that basumrinmoy is/was having.
    I have a clear reference to jqwidgets/jqxgrid.selection and I have an alert popping up on my screen to include jqxgrid.selection.js.

    HTML:
    [code]

    <!DOCTYPE html>
    <html>
    <head>
    <link rel=”stylesheet” href=”../script/jqwidgets/styles/jqx.base.css” type=”text/css”/>
    <link rel=”stylesheet” href=”../script/jqwidgets/styles/jqx.classic.css” type=”text/css”/>
    <script type=”text/javascript” src=”../script/scripts/jquery-1.8.2.min.js”></script>
    <script type=”text/javascript” src=”../script/jqwidgets/jqxcore.js”></script>
    <script type=”text/javascript” src=”../script/jqwidgets/jqxbuttons.js”></script>
    <script type=”text/javascript” src=”../script/jqwidgets/jqxscrollbar.js”></script>
    <script type=”text/javascript” src=”../script/jqwidgets/jqxlistbox.js”></script>
    <script type=”text/javascript” src=”../script/jqwidgets/jqxdropdownlist.js”></script>
    <script type=”text/javascript” src=”../script/jqwidgets/jqxmenu.js”></script>
    <script type=”text/javascript” src=”../script/jqwidgets/jqxgrid.js”></script>
    <script type=”text/javascript” src=”../script/jqwidgets/jqxdata.js”></script>
    <script type=”text/javascript” src=”../script/jqwidgets/jqxgrid.pager.js”></script>
    <script type=”text/javascript” src=”../script/jqwidgets/jqxgrid.sort.js”></script>
    <script type=”text=javascript” src=”../script/jqwidgets/jqxgrid.selection.js”></script>
    <title>Test JQuery grid with JQWidgets</title>
    </head>
    <body>
    <script type=”text/javascript”>
    $(document).ready(function () { // prepare the data
    var data = new Array();
    var firstNames = [ “Andrew”,
    “Nancy”,
    “Shelley”,
    “Regina”,
    “Yoshi”,
    “Antoni”,
    “Mayumi”,
    “Ian”,
    “Peter”,
    “Lars”,
    “Petra”,
    “Martin”,
    “Sven”,
    “Elio”,
    “Beate”,
    “Cheryl”,
    “Michael”,
    “Guylene”
    ];
    var lastNames = [
    “Fuller”,
    “Davolio”,
    “Burke”,
    “Murphy”,
    “Nagase”,
    “Saavedra”,
    “Ohno”,
    “Devling”,
    “Wilson”,
    “Peterson”,
    “Winkler”,
    “Bein”,
    “Petersen”,
    “Rossi”,
    “Vileid”,
    “Saylor”,
    “Bjorn”,
    “Nodier”
    ];
    var productNames = [
    “Black Tea”,
    “Green Tea”,
    “Caffe Espresso”,
    “Doubleshot Espresso”,
    “Caffe Latte”,
    “White Chocolate Mocha”,
    “Cramel Latte”,
    “Caffe Americano”,
    “Cappuccino”,
    “Espresso Truffle”,
    “Espresso con Panna”,
    “Peppermint Mocha Twist”
    ];
    var priceValues = [
    “2.25”,
    “1.5”,
    “3.0”,
    “3.3”,
    “4.5”,
    “3.6”,
    “3.8”,
    “2.5”,
    “5.0”,
    “1.75”,
    “3.25”,
    “4.0”
    ];

    for (var i = 0; i < 100; i++) {
    var row = {};
    var productindex = Math.floor(Math.random() * productNames.length);
    var price = parseFloat(priceValues[productindex]);
    var quantity = 1 + Math.round(Math.random() * 10);
    row["firstname"] = firstNames[Math.floor(Math.random() * firstNames.length)];
    row["lastname"] = lastNames[Math.floor(Math.random() * lastNames.length)];
    row["productname"] = productNames[productindex];
    row["price"] = price;
    row["quantity"] = quantity;
    row["total"] = price * quantity;
    data[i] = row;
    }

    var source1 = { data: data, datatype: "array" };
    $("#Grid").jqxGrid({
    width: 670,
    source: source1,
    theme: 'classic',
    pageable: true,
    sortable: true,
    autoheight: true,
    columns: [
    {
    text: 'First Name',
    datafield: 'firstname',
    width: 100
    },
    {
    text: 'Last Name',
    datafield: 'lastname',
    width: 100
    },
    {
    text: 'Product',
    datafield: 'productname',
    width: 180
    },
    {
    text: 'Quantity',
    datafield: 'quantity',
    width: 80,
    cellsalign: 'right'
    },
    {
    text: 'Unit Price',
    datafield: 'price',
    width: 90,
    cellsalign: 'right',
    cellsformat: 'c2'
    },
    {
    text: 'Total',
    datafield: 'total',
    cellsalign: 'right',
    cellsformat: 'c2'
    }
    ]
    });

    });
    </script>

    <div id="Grid"></div>
    </body>
    </html>

    [/code]

    Custom Selection not working for me #16400

    hadaad
    Member

    Found the solution to my problem. Typographical error: text=javascript instead of text/javascript. My bad.

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

You must be logged in to reply to this topic.