1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    211
    Vote Rating
    0
    hieu79vn is an unknown quantity at this point

      0  

    Default Call a function in C# to get json string

    Call a function in C# to get json string


    Hi

    I have a data grid A and another grid B: When user click on a row of A, B will show a grid detail with the ID of the row clicked in A.
    I have a function called GetBlogList(int rowIDofA) on server (written in C#) which will return a json string.
    How can I call this function and pass the parameter when user click on a row of A?

    Thank you

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,197
    Vote Rating
    482
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    You should be able to make an AJAX call to the function from the grid selection event.

    Scott.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    211
    Vote Rating
    0
    hieu79vn is an unknown quantity at this point

      0  

    Default


    Hi Scott
    Do you have an example?

    Thanks

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,197
    Vote Rating
    482
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    This is a typical call

    Code:
    Ext.Ajax.request({
        method: 'POST', // change method if desired
        url: 'list.php', // your url
        params: {
            // send any parms ... prop: value
        },
        success: function(xhr) {
            // response info; perform actions here
        },
        failure: function() {
            alert('AJAX FAILURE: Unable to delete selected users');
        }
    });
    Scott.

  5. #5
    Sencha User
    Join Date
    Jun 2012
    Posts
    0
    Vote Rating
    0
    johncarter588 is on a distinguished road

      0  

    Default


    I am also looking for same thing...

  6. #6
    Sencha User
    Join Date
    Mar 2012
    Posts
    211
    Vote Rating
    0
    hieu79vn is an unknown quantity at this point

      0  

    Default


    merci Scott

Thread Participants: 2