jQWidgets Forums

Forum Replies Created

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

  • reggaeone13
    Participant

    Hi Dimitar,

    thank you very very much!
    I am happy!


    reggaeone13
    Participant

    Hello Dimitar,

    please, can you help me with an example to start with the solution 1 (grid with paging, one row (month) per page)?

    I will appreciate this!

    I don’t understand, what you mean by “one row (month) per page” and I don’t know, how can I implement the “pager” callback function (pagenum, pagesize, oldpagenum) to achieve this (I’am begginer regarding Javascript).

    I don’t want any change of page size by the user, only “pagechanged” event should be treated.
    Should I take “virtual mode” for the Grid?

    Thank you, thank you in advance!


    reggaeone13
    Participant

    Thank you, thank you very much for the prompt answer.
    I will try with the built-in paging.


    reggaeone13
    Participant

    Hi Peter,

    thank you very much for the reply.

    Yes, I test even now this grid with the values from the local array. This works fine, but I don’t have the data into an local array.
    My data comes from SQL Database by using a .asmx Web Service and dataType: ‘json’. So, when I call the Web Method to get the data (GetData), the values into the column Preis are correctly displayed (with “,” decimal separator), but after the cell was edited the localization change to en-EN. If I make a reload of the grid, then the edited cells are with “,” decimal separator again.

    Please, what can I do to make this to work?

    Thanks a lot for the answer!!!


    reggaeone13
    Participant

    Thank you very much for the answer.

    in reply to: Close editor before delete row Close editor before delete row #28877

    reggaeone13
    Participant

    Hi Peter,
    thank you very much for the fast answer.
    I will try this.


    reggaeone13
    Participant

    Hi,

    first of all thank you very much for the answer.

    Please, I have another question regarding updaterow method.

    Conform documentation “Editing (requires jqxgrid.edit.js)” and Code example

    Invoke the updaterow method

    // @param row id. Use the ‘getrowid’ method to get the id of a row.
    // @param row data. The expected value is a JSON object.
    var value = $(‘#jqxGrid’).jqxGrid(‘updaterow’, rowid, newdata);

    Can the JSON object be empty as Response from Server, when some of the row’s cells are empty, because the row is blank?

    What is expected as JSON object, when a blank row was added and an update command is send to Server?

    Please, I need this help!

    My jqxGrid cannot be updated in the database!
    In this situation I must Abort this Project, because it make not sense to have a pretty coool jqxGrid without update to database!

    Thank you very much in advance!

    in reply to: Menu with multiple columns Menu with multiple columns #28783

    reggaeone13
    Participant

    Hi Mariya,

    Thank you very much!

    in reply to: Add new row with today date Add new row with today date #28698

    reggaeone13
    Participant

    Hi,

    many thanks for the answer.

    I read many Topics in this Forum before I decide to write here.
    I read the documentation many times and I followed the example “jqxGrid CRUD (ASP .NET MVC3)” step by step.
    This example “jqxGrid CRUD (ASP .NET MVC3)” cannot synchronize with my SQL Server on my system. No “updaterow” in database, no “addrow” in database, no “deleterow” in database.
    All this operations are generated in this example by clicking on the buttons, right to the grid and this is possible, because the data in this example comes from local Array. A “addrow” operation adds a complete row per random.

    But, the synchronization with my SQL Server does not work neither in this example nor simple ASP.NET (I use ASP.NET and the grid can be bound and data from SQL Server can be displayed into the grid, but this is the only thing that it works!!!).

    I cannot synchronize the data with the SQL Server.
    I followed all what you said, but no “addrow” and no “updaterow” can be done in the database.

    Please, tell me, what should I do?
    Or better, please, can someone help, that has success with the CRUD Operation using SQL Sever?

    Please, please help!
    I spend many hours and days with this.
    I don’t know, what next!!

    Thank you very, very much!


    reggaeone13
    Participant

    Hi Peter,

    thank you very much for the fast answer!!!!

    in reply to: Add new row with today date Add new row with today date #28678

    reggaeone13
    Participant

    Thanks a lot for the rapid answer. This is great!!!.

    I already use the documentation.
    The example in the documentation works with local array and the new row is complete at the beginning.
    That is the difference.

    My problem is: by adding the row the updaterow method is called:

    -> var commit = $(“#jqxgrid”).jqxGrid(‘updaterow’, rowindex, rowData);

    and an empty row will be showed, because the incomplete added row cannot be save into the SQL database (because of constrains).
    In source object I have no addrow method, only updaterow.

    Should I add a addrow in source object?

    Here is my code:

    // today value to show by creating of a new row
    var today = new Date();
    var formattedCurDate = “”;

    if ($.jqx.dataFormat.isDate(today)) {
    // german date
    formattedCurDate = $.jqx.dataFormat.formatdate(today, ‘dd.MM.yyyy’);
    }

    var generaterow = function () {
    var row = {};
    row[“Id”] = createGuid(); // Id column is set to be invisible
    row[“Date”] = new Date(); // this does not work -> formattedCurDate;

    return row;
    };

    addButton.bind(‘click’, function () {
    var rowIndex = $(“#jqxgrid”).jqxGrid(‘getdatainformation’).rowscount;
    var generatedRow = generaterow();

    $(‘#jqxgrid’).jqxGrid(‘addrow’, null, generatedRow);

    // jqxGrid doesn’t scroll to the page, so do it ourselves
    var value = $(‘#jqxgrid’).jqxGrid(‘getrows’).length;
    $(‘#jqxgrid’).jqxGrid(‘ensurerowvisible’, value);
    });

    { text: ‘Datum’, dataField: ‘Date’, columntype: ‘datetimeinput’, cellsalign: ‘left’, cellsformat: ‘d’, width: ‘8%’,
    validation: function (cell, value) {

    },

    cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
    if (newvalue > curDate) {
    return curDate;
    }
    if (newvalue == “”) {
    return oldvalue;
    }
    }

    },

    Many thanks in advance.

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