jQWidgets Forums

Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: Grid validation Grid validation #11091

    naveen
    Member

    Thanks Peter,

    I would like to assign the same validation while on click on a submit button. If values of particular column are empty, then I would like to trigger the validation. How to achieve this kind of validation? Thank you.

    in reply to: making a column non-editable making a column non-editable #11056

    naveen
    Member

    Thank you, Peter Stoev. You guys helped me a lot. Thanks to you and your team for providing such a wonderful support. Wish you all the best.

    Regards
    Naveen

    in reply to: making a column non-editable making a column non-editable #11054

    naveen
    Member

    I searched and not able to found the column non-editable property. Do you have an example that shows to make a column non-editable?

    in reply to: saving grid values to Database saving grid values to Database #9386

    naveen
    Member

    getrows is printing the data in below format instead of the actual data.

    [object Object], [object Object], [object Object], [object Object], [object Object]

    in reply to: saving grid values to Database saving grid values to Database #9382

    naveen
    Member

    Dimitar,

    Let me know how to save all the grid value to PHP. I’ll convert it to JAVA. (If I am asking for java, then provide me PHP code).

    I also tried using the below method but it only gives me only one row value.

    var data = $(‘#grid’).jqxGrid(‘getrowdata’, 0);

    I would like to know how to get all the grid values. Thank you.

    in reply to: error: Object Excepted error: Object Excepted #9345

    naveen
    Member

    Here is the code. Also Add Delete and update buttons are not working. Let me know if I am making any mistake in Jquery as I am a beginner for jquery.

    $(document).ready(function () {
    $.post(“getaccess.jsp”, {“processId”: $(“#procId”).val()}, function(data1){
    var theme = getTheme();
    // var data =
    //var url = new Object();
    var url = data1;
    alert(url);
    // prepare the data
    var source =
    {
    datatype: “json”,
    datafields: [
    { name: ’empId’ },
    { name: ‘fname’ },
    { name: ‘lname’},
    { name: ’empcat’},
    { name: ‘dept’},
    { name: ‘jTitle’},
    { name: ‘rAccess’},
    { name: ‘lManager’},
    { name: ‘sDate’},
    { name: ‘eDate’}
    ],
    localdata: url,
    addrow: function (rowid, rowdata) {
    // synchronize with the server – send insert command
    var data = “insert=true&” + $.param(rowdata);
    $.ajax({
    dataType: ‘json’,
    url: ‘Testing.jsp’,
    data: data,
    success: function (data, status, xhr) {
    // insert command is executed.
    }
    });
    },
    deleterow: function (rowid) {
    // synchronize with the server – send delete command
    var data = “delete=true&EmployeeID=” + rowid;
    $.ajax({
    dataType: ‘json’,
    url: ‘Testing.jsp’,
    data: data,
    success: function (data, status, xhr) {
    // delete command is executed.
    }
    });
    },
    updaterow: function (rowid, rowdata) {
    // synchronize with the server – send update command
    var data = “update=true&” + $.param(rowdata);
    $.ajax({
    dataType: ‘json’,
    url: ‘Testing.jsp’,
    data: data,
    success: function (data, status, xhr) {
    // update command is executed.
    }
    });
    }
    };

    var dataAdapter = new $.jqx.dataAdapter(source);
    //, {
    // downloadComplete: function (data, status, xhr) { },
    //loadComplete: function (data) { },
    //loadError: function (xhr, status, error) { }
    //});
    // initialize jqxGrid

    $(“#jqxgrid”).jqxGrid(
    {
    width: 1200,
    source: dataAdapter,
    theme: theme,
    editable:true,
    pageable: true,
    autoheight: false,
    columns: [
    { text: ‘Employee ID’, datafield: ’empId’, width: 90 },
    { text: ‘First Name’, datafield: ‘fname’, width: 140 },
    { text: ‘Last Name’, datafield: ‘lname’, width: 140 },
    { text: ‘Employee Category’, datafield: ’empcat’, width: 130 },
    { text: ‘Department’, datafield: ‘dept’, width: 115 },
    { text: ‘Job Title’, datafield: ‘jTitle’, width: 115 },
    { text: ‘Reason for Access’, datafield: ‘rAccess’, width: 135 },
    { text: ‘Line Manager’, datafield: ‘lManager’, width: 105 },
    { text: ‘Start Date’, datafield: ‘sDate’, width: 95 },
    { text: ‘End Date’, datafield: ‘eDate’, width: 95 },

    ]
    });
    $(“#addrowbutton”).jqxButton({ theme: theme });
    $(“#deleterowbutton”).jqxButton({ theme: theme });
    $(“#updaterowbutton”).jqxButton({ theme: theme });
    // update row.
    $(“#updaterowbutton”).bind(‘click’, function () {
    var datarow = generaterow();

    var selectedrowindex = $(“#jqxgrid”).jqxGrid(‘getselectedrowindex’);
    var rowscount = $(“#jqxgrid”).jqxGrid(‘getdatainformation’).rowscount;
    if (selectedrowindex >= 0 && selectedrowindex = 0 && selectedrowindex < rowscount) {
    var id = $("#jqxgrid").jqxGrid('getrowid', selectedrowindex);
    $("#jqxgrid").jqxGrid('deleterow', id);
    }
    });
    });
    });

    <input type="hidden" id="procId" value="” name=”processId”>

    in reply to: saving grid values to Database saving grid values to Database #9283

    naveen
    Member

    Thanks for the reply.

    Is it possible to save the grid values to JAVA variables? thank you.

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