how to create combobox in table

how to create combobox in table

dragonflydragonfly Posts: 2Questions: 0Answers: 0
edited December 2010 in KeyTable
Hi to all,

I have got a datatable . I have created and filled the table as shown below. Now I need to implement a comboboxto allow the user select a year . then when user clicks View or Modify link, which is placed in the table, selected year will be passed to another page as a parameter. Now how can I turn my year column into a combobox?Thanks.
rulesTableGlobal = $('#rulesTable').dataTable( {
//"bJQueryUI": true,
"sPaginationType": "full_numbers",
"aoColumns": [
{ "sTitle": "Id", "sWidth" : "20px" },
{ "sTitle": "Property ID" , "sWidth" : "20px"},
{ "sTitle": "Adress" , "sWidth" : "130px"},
{ "sTitle": "Suburb" , "sWidth" : "50px"},
{ "sTitle": "Bond", "sWidth" : "25px" },
{ "sTitle": "Year", "sWidth" : "25px" , "aType": "dom-select"},
{ "sTitle": "View or Modify" , "sWidth" : "50px"}]

});

function addPropertyToTable( lt_id, lt_uid, address, suburb_name, min_guests, max_guests,
bondFee,cleaningFee,bookingServiceFee, weekly_rate,nightly_rate){

var _lt_id = "\'" + lt_id + "\'";
var viewLink = 'View and Modify';
var year= "";

$('#rulesTable').dataTable().fnAddData( [
lt_id, lt_uid, address, suburb_name, bondFee,cleaningFee,bookingServiceFee, weekly_rate,nightly_rate, min_guests, max_guests, year, viewLink ] );


}

});

}

Replies

  • shivanishivani Posts: 2Questions: 0Answers: 0
    u can use an action listener in javascript then collect the data from the button. which can then be passed to the other page as a parameter
  • shivanishivani Posts: 2Questions: 0Answers: 0
    i hope this will help. if not i will post the code.
This discussion has been closed.