Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
640
Getting Client Id of Selected Row in JavaScript
posted

Hi,

How can i get the Client Id of selected row through javascript. Here is my JavaScript Code

function dgAllocation_CellEditing_ExitedEditMode(sender, eventArgs)

{
var grid = $find("<%=dgAllocation.ClientID%>");

var gridBehaviors = grid.get_behaviors();

var row = gridBehaviors.get_selection().get_selectedRows().getItem(0);
alert(row);
var rowId = row.get_index();
}

I need clientId instead of rowIndex.

Parents
  • 2535
    Verified Answer
    Offline posted

    Hello,

    Thank you for using our forum.

    Rows do not have client id, you can get data key with the row.get_dataKey(), which returns the data key value of the row.

    Can you please explain in more details what is the behavior you want to achieve.

    Let me know if I may be of further assistance.

Reply Children