This is a migrated thread and some comments may be shown as answers.

[Solved] Client Side Selecting and DataKey

0 Answers 113 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Theunis Janse van Vuuren
Top achievements
Rank 1
Theunis Janse van Vuuren asked on 06 Aug 2010, 12:54 PM
Hi there,

I am looking to implement client side selecting on a grid, this in turn opens up a tab and dependant on the datakey item selected in the grid row I return data for the freshly opened tab. This all works but when I select a values from a cell in the grid. I would like to use the DataKey for the grid to do this. Is there any way to get the datakey value for the specific row without displaying it and using that and not a value in the grid row/ cell

PS. Tried to use the format clock but our sonicwall blocked it

function onAccountsRowSelected(e) {
    ShowLoader();

    var AccountsGrid = $('#AccountsGrid').data('tGrid');
//get the value from the grid - want to use the datakey here
    var unique_ref = e.row.cells[0].innerHTML;

//handle the grouped row - this is why I would like to use datakey
    if (e.row.cells[0].innerHTML == "&nbsp" || e.row.cells[0].innerHTML == "") {
        unique_ref = e.row.cells[1].innerHTML;
    }
    if (unique_ref != "No Records Found") {

        jQuery.ajax({
            type: "POST",
            data: { strUnique_Ref: unique_ref, ActionType: "ReadOnly" },
            url: document.forms[0].action,
            timeout: 45000,
            success: function (r) {
                var tabstrip = $("#TabStrip").data("tTabStrip");
                var item = $("li", tabstrip.element)[1];
                tabstrip.enable(item);
                tabstrip.select(item);

                $('#AccountDetailsAjaxDiv').html(r);
                HideLoader();
            }
        })
    }
    HideLoader();
}
Tags
Grid
Asked by
Theunis Janse van Vuuren
Top achievements
Rank 1
Share this question
or