jQuery UI Widgets Forums Grid addrow with unique id

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • addrow with unique id #105201

    arkgroup
    Participant

    I have grid with everpresentrow. Addrow is firing and I do AJAX call to server to insert new row.
    AJAX call returned new unique generated id and I do commit(true, new_id);
    Grid still not show new id, I tried commit(true, data); with no luck. New id is not showing until I completely refresh page.
    I also tried refresh and refreshdata methods.
    What do I miss?

    Thanks

    addrow with unique id #105218

    Todor
    Participant

    Hello arkgroup,

    Please check whether your addrow function is like the following:

    addrow: function (rowid, rowdata, position, commit) {
        // synchronize with the server - send insert command
    	var data = "insert=true&" + $.param(rowdata);
    		$.ajax({
                dataType: 'json',
                url: 'data.php',
                data: data,
    			cache: false,
                success: function (data, status, xhr) {
    				// insert command is executed.
    				commit(true, id);
    			},
    			error: function(jqXHR, textStatus, errorThrown)
    			{
    				commit(false);
    			}
    		});							
    }

    Also you could review the following topic.

    Let us know if you need further assistance.

    Best Regards,
    Todor

    jQWidgets Team
    https://www.jqwidgets.com

    addrow with unique id #105221

    arkgroup
    Participant

    Yes, I did like that. I can solve the problem by using setcellvaluebyid after ajax call, but not with commit.
    I am using ASP.NET. Can you test with ASP.NET?

    Thanks.

    addrow with unique id #105231

    Todor
    Participant

    Hello arkgroup,

    Thanks for clarification that you are using ASP.NET. I would like to suggest you to review this topic. It is exactly for ASP.NET.

    Also if you provide some code example will be in greater help for us to investigate the issue properly or at least what errors you are getting if any.

    Best Regards,
    Todor

    jQWidgets Team
    https://www.jqwidgets.com

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

You must be logged in to reply to this topic.