PDA

View Full Version : getting the id



stevieke
21 Apr 2009, 4:09 AM
var panelEastPrestation= new Ext.grid.GridPanel({

......

columns: [
expander,
{id:"prestationID",
header: "Project", dataIndex: "Project", sortable: true},
{header: "Subproject", dataIndex: "Subproject", sortable: true},
{header: "Date", dataIndex: "Date", sortable: true, renderer: Ext.util.Format.dateRenderer('d/m/Y')},
{header: "Activity", dataIndex: "Activity", sortable: true},
{header: "Hours", dataIndex: "Hours", sortable: true},
{header: "User", dataIndex: "User", sortable: true}

],

.....



like you see i set the prestationID as id
now i want to know which row is selected so i need the id
how does i do this?



var sm = panelEastPrestation.getSelectionModel();

if(sm.hasSelection()){
PopUp = GetPopUp();
alert( /* here has to come the id of the selected prestation */);

mjlecomte
21 Apr 2009, 6:49 PM
are you really using Ext 1?