>>So the difference with the original flexigrid code and new one is that in the original the trSelected seemed to attach when I selected a row with the mouse. Right now this class only attaches after I click on the row. That's the difference and that's why that code didn't work.
>>
>
>If you're not actually letting them edit all the selected items (that is, you're just editing the item they double-clicked on), why not just grab the object reference that is passed when the dblclick() event is called, ex:
>
>
>$('#flexClients').dblclick(function (e) {
> var id = $(e.target).attr('id')';
> // id should contain the row id
>});
>
What is e.target here and did you do omit 'tr' here on purpose, so you bind the grid's doubleclick and not row double click?
BTW, I jus re-tried and I still get id is undefined.
$('#flexClients').dblclick(function (e) {
var id = $(e.target).attr('id');
// id should contain the row id
alert("Id is " + id);
});
If I try it like this
$('#flexClients').dblclick(function (e) {
alert(e.target);
var id = $(e.target).attr('id');
// id should contain the row id
alert("Id is " + id);
});
the first returns HTMLDivElement.
So, I suspect that e.target does not return a reference to tr
If it's not broken, fix it until it is.
My Blog