Is it not possible to have both AllowRowSelect and OnRowClick in the ClientSettings?
I can get either one to work properly when the other is not present. With the setup below the OnRowClick functions, but my clicked row is not highlighted anymore.
<ClientSettings EnablePostBackOnRowClick="true">
<Selecting AllowRowSelect="True" />
<ClientEvents OnRowClick="OnRowClick" />
</ClientSettings>
<script language="javascript" type="text/javascript">
function OnRowClick(index)
{
var ContactId = this.GetCellByColumnUniqueName(this.Rows[index], "ContactId").innerHTML;
var AccountId = this.GetCellByColumnUniqueName(this.Rows[index], "AccountId").innerHTML;
var FullName = this.GetCellByColumnUniqueName(this.Rows[index], "FullName").innerHTML;
document.getElementById('<%= hdnContactId.ClientID %>').value = ContactId;
document.getElementById('<%= hdnAccountId.ClientID %>').value = AccountId;
document.getElementById('<%= hdnContactName.ClientID %>').value = FullName;
return false;
}
</script>
I can get either one to work properly when the other is not present. With the setup below the OnRowClick functions, but my clicked row is not highlighted anymore.
<ClientSettings EnablePostBackOnRowClick="true">
<Selecting AllowRowSelect="True" />
<ClientEvents OnRowClick="OnRowClick" />
</ClientSettings>
<script language="javascript" type="text/javascript">
function OnRowClick(index)
{
var ContactId = this.GetCellByColumnUniqueName(this.Rows[index], "ContactId").innerHTML;
var AccountId = this.GetCellByColumnUniqueName(this.Rows[index], "AccountId").innerHTML;
var FullName = this.GetCellByColumnUniqueName(this.Rows[index], "FullName").innerHTML;
document.getElementById('<%= hdnContactId.ClientID %>').value = ContactId;
document.getElementById('<%= hdnAccountId.ClientID %>').value = AccountId;
document.getElementById('<%= hdnContactName.ClientID %>').value = FullName;
return false;
}
</script>