tags:

views:

54

answers:

1

hello friends I am using this code to go to other tab one double click

 ondblClickRow: function() {
                var $tabs = $('#tabs').tabs();
                var selected = $tabs.tabs('select', 2);
                },

I am going to second tab on double click, I need to know is there anything way that we can pass the value..

I am getting a vlue in tab1 I am going to use the same value in tab2 is there any way we can do this

thanks

A: 

Kumar, Hi again, It seem you are using JQGrid with this implementation. If so, the ondblClickRow event allows you to pass the following values (rowid,iRow,iCol,e).. by using this you could from one tab doubleClick the row and enter the next tab with the corresponding row selected. try something LIKE this

ondblClickRow: function (rowid, iRow, iCol, e)
{
  var $tabs = $('#tabs').tabs(); 
  var selected = $tabs.tabs('select', 2); 
  //now using rowID you can select grid values in your main grid  by $("#[your mainGrid]").getRowData(rowid)
}
John Hartsock
THanks for your time sir,,I tried no luck.. for me..but here above function we are not passing anything while going to other tab? how we are goign to get the value in other tab?
kumar
ok, if you have the rowId of the jqgrid you can get the data and format it into HTML, then enter it into the second tab. Use JqGrid's getRowData(rowId) function to collect the row's data and inject HTML into the second tab. Or use javascript to populate fields in the second tab
John Hartsock
Thanks for your info sir.. please if you have any sample code can you provide me it will be very helpfull for methanks
kumar