Hii… masters, How to add id in column in gridview
Hii… masters, How to add id in column in gridview
Ok thank. but I can’t implementation it.
how to use it ? please post the code…;
'columns' => array(
...
array(
...
'header' => 'Header',
'value' => 'Value',
'id' => 'column_id',
...
)
...
)
ok I have tried it but it’s not random, I want id same as id of data,…
thank for help me
Hmmm … Why do you need it? For JavaScript? If yes you can use $.fn.yiiGridView.getKey jQuery function:
$('.grid-view table tbody tr').live('click', function() {
var id = $.fn.yiiGridView.getKey(
$(this).closest('.grid-view').attr('id'),
$(this).prevAll().length
);
window.location = viewUrl + id;
});